|
| [WD20] Help Deserialize json |
| Iniciado por guest, 18,ago. 2015 11:41 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 18,agosto 2015 - 11:41 |
hi,
I need to Deserialize() the following json
{ "RS": "OK", "ER": "", "DT": [ { "id": "A1", "name": "AAA", "disable": 0 }, { "id": "B1", "name": "BBB", "disable": 1 }, { "id": "C1", "name": "CCC", "disable": 1 } ] }
using following method , I manage to get RS and ER value, but I don't know how to get DT values.
STdt is Structure id is string nm is string ds is int END
STjson is Structure RS is string ER is string DT is array of STdt END
m_STjson is STjson
Deserialize(m_STjson, cMyResponse..Content, psdJSON) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 18,agosto 2015 - 16:42 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 19,agosto 2015 - 08:24 |
Hi,
You have to make sure your names of the structure match the names (and types) of the JSON data.
In your structure you have ds int, in your JSON this is called disable !
Have a nice day Danny |
| |
| |
| | | |
|
| | | | |
| | |
|