Skip to content

Better Deserialization of Extension Types with Jackson #398

Description

@fuyumatsuri

If you do a readTree that contains an extension type, the resulting tree will look something like (for example) [1, 2, [MessagePackExtensionType, MessagePackExtensionType']. In order to make this tree usable you need to traverse the whole tree converting any MessagePackExtensionType object to the real object type. It would be much better if reading the tree instead resulted in [1, 2, [RealClass, RealClass]].

Ideally I would like to be able to do something along the lines of

factory = new MessagePackFactory
factory.register(typeId, class, encoder, decoder)

and have MessagePackParser check if a type is registered to return the correct object.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions