I am dealing with a JSON stream that has a rather complicated array of objects. There are twice- and sometimes triple-nested objects. Therefore, DeserializeJson(MessagePack) fails to deserialize it.
A workaround is that I parse it as xml and enable “Array Attribute”, then back to Json and deserializing it to VLObject.
is there a level of nested objects where the Deserializer would fail?
Here is the json sample
{
“ok”: true,
“result”: [
{
“update_id”: 111546405,
“message”: {
“message_id”: 107,
“from”: {
“id”: 11111011,
“is_bot”: false,
“first_name”: “john”,
“username”: “johnjohn”,
“language_code”: “en”
},
“chat”: {
“id”: 111119011,
“first_name”: “john”,
“username”: “johnjohn”,
“type”: “private”
},
“date”: 12116935064,
“text”: “First”
}
},
{
“update_id”: 60127606,
“message”: {
“message_id”: 108,
“from”: {
“id”: 115128819011,
“is_bot”: false,
“first_name”: “john”,
“username”: “johnjohn”,
“language_code”: “en”
},
“chat”: {
“id”: 11598899011,
“first_name”: “john”,
“username”: “johnjohn”,
“type”: “private”
},
“date”: 1987935076,
“text”: “Second one”
}
},
{
“update_id”: 601888766407,
“message”: {
“message_id”: 109,
“from”: {
“id”: 1198006219011,
“is_bot”: false,
“first_name”: “john”,
“username”: “johnjohn”,
“language_code”: “en”
},
“chat”: {
“id”: 186755219011,
“first_name”: “john”,
“username”: “johnjohn”,
“type”: “private”
},
“date”: 17198780,
“text”: “Another one”
}
},
{
“update_id”: 60158698764408,
“message”: {
“message_id”: 110,
“from”: {
“id”: 11521901s341,
“is_bot”: false,
“first_name”: “john”,
“username”: “johnjohn”,
“language_code”: “en”
},
“chat”: {
“id”: 11754165011,
“first_name”: “johnjohn”,
“username”: “johnjohn”,
“type”: “private”
},
“date”: 1716935109,
“photo”: [
{
“file_id”: “AgACAjkgzAAxkBAANulknlZZxfP8aJ-3MHKm1FxjcLRp5_oAAplkhuizztRunljksNFSZLSiABAAMCAANzAAM1BA”,
“file_unique_id”: “AQAssbsccxGjhikkJ4”,
“file_size”: 951,
“width”: 90,
“height”: 50
},
{
“file_id”: “AgACAgQAAvsvBAANuZlZZxfP8aJ-3MHKm1svslknp5_oAAp3HMssDKLFSaOgqs8ZLMCAANtAAM1BA”,
“file_unique_id”: “AQADnlöskosVJy”,
“file_size”: 9994,
“width”: 320,
“height”: 178
},
{
“file_id”: “AgACAkjhlZZxfP8aJ-3MHKm1FxjcLRp5_oAAp3HMRuDKL,m iuAAMCAAN4AAM1BA”,
“file_unique_id”: “lknlkmvsssVJ9”,
“file_size”: 38256,
“width”: 800,
“height”: 444
},
{
“file_id”: “AgAClklZZxfP8aJ-3MHKm1FxjcLRp5_oAAp3HMkjbjkSiABAAMCAAN5AAM1BA”,
“file_unique_id”: “AQAmnppsüosVJ-”,
“file_size”: 68741,
“width”: 1280,
“height”: 710
}
],
“caption”: “Image with caption”
}
}
]
}