Skip to content

How to choose different object based on the JSON content #54

@SirStone

Description

@SirStone

Hi
Pretty new to NIM so It's likely that I'm missing some information that I can't see in the doc but is there. Whit this premisis here my question:
I have a JSON message received and I need to convert it to an object between several ones, for example "MessageType1" and "MessageType2"; the information if the JSON message is of type1 or type2 is written inside it, in a specific string field.
How can I convert the JSON message to the right object with jsony in the fastest way?

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions