Skip to content

I want to deserialize a property with any type of value. #175

Open
@tkatochin

Description

I have a json whose properties are sometimes strings and sometimes objects.

example)
[
{
"type": "foo"
},
{
"type": {
"text": "baa",
"detail": "baa means not foo"
}
}
]

Is it possible to create a bean class that can handle this kind of case with gwt-jackson?
If the type property of the loaded json is string, I would like to convert it to an object with { text: "(inject string value)", "detaul": null } and store it in a bean.
It would be nice if I could handle derived classes of com.github.nmorel.gwtjackson.client.JsonDeserializer using JsonDeserialize. . .

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