I have the following Json:
{
"id": "id1",
"version": "id1",
"license": { "type": "MIT" }
}
Which can also be in the form of:
{
"id": "id1",
"version": "id1",
"license": "MIT"
}
And sometimes it can be:
{
"id": "id1",
"version": "id1",
"licenses": [
{ "type": "MIT", "url: "path/to/mit" },
{ "type": "Apache2", "url: "path/to/apache" }]
}
All of the above are essentially the same, I'm looking for a way to combine them with a single field and deserialize it using Jackson. Any Ideas?