lundi 23 février 2015

How can I parse an unqualified JSON array using Jackson?



So, I am accessing a third-party API and it's giving me this JSON object, but I'm having a whale of a time trying to find an elegant way to parse the resources sub-object using Jackson.


I'm assuming I have to write a custom deserializer, though I'm wondering if there's another way...



{
"somekey": "somevalue",
"resources": [
"list",
[
{
"@type": "com.yada.Yada",
"resource": {
"@type": "ServiceObjectReference",
"id": "emp1234",
"displayName": "Bob Smith"
},
"type": "TYPE_PERSON",
"resourceType": 200
}
}



Aucun commentaire:

Enregistrer un commentaire