I have a json response with irregular objects which I want to serialize to an interface , my json as below, can it be possible with null objects defined in an interface so it wont break JSON serialized object while parsing. I can't use any typeDef as it is against our lint rules
{
"json": [
{
"id": "urn:authenticator-list",
"statusCode": 200,
"headers": {
"ETag": "\"str\"",
"Cache-Control": "max-age=60"
},
"body": {
"references": {
"items": [
"myobject1",
"myobject2",
"myobject3",
"myobject4"
]
}
}
},
{
"id": "urn:authenticator:clickone",
"statusCode": 200,
"headers": {
"ETag": "\"4w\"",
"Cache-Control": "max-age=1374"
},
"body": {
"name": "Myname",
"code": "my_name",
"authenticatorType": "new",
"region": "US12",
"unsupportedClientIds": [],
"sso": {
"isSsoImplemented": true,
},
"references": {
"sso": "urn:apple"
},
"images": {
"logo": "mylogo",
"signupGrid": "mylog"
},
"isDeviceBrowserRequiredForAuth": false
}
}
]
}