Skip to content

Need help (de)serializing a custom binary data type in both JSON and MsgPackΒ #2195

@attermann

Description

@attermann

Describe the issue
I have a custom class Bytes that represents a buffer of binary data. I would like to be able to include (de)serialization for the class that can be used with either JSON or MsgPack where it uses a Base64 encoded string for JSON and MsgPackBinary for MsgPack.

It seems like it used to be possible in version prior to 7 to detect whether JSON or MsgPack was in use while (de)serializing (e.g., isMsgPack() on the Variant). Is this still possible in version 7? If so can I get some tips on how to implement?

TY!

Troubleshooter report
N/A

Environment
MacOS native for testing/dev.

Reproduction
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions