11
I have a doubt regarding JSON, I have the following JSON:
{
"jsonrpc":"2.0",
"result":{
"nr":26,
"lista":[
{
"codigo":"2",
"nome":"Pratos Quentes",
"foto":"./images/cupcake.png"
},
{
"codigo":"3",
"nome":"Sobremesas",
"foto":"./images/cupcake.png"
},
{
"codigo":"4",
"nome":"Bebidas Nao Alcoolicas",
"foto":"./images/cupcake.png"
},
{
"codigo":"7",
"nome":"Cocktails",
"foto":"./images/cupcake.png"
},
{
"codigo":"10",
"nome":"Cafes",
"foto":"./images/cupcake.png"
},
{
"codigo":"11",
"nome":"Consummes",
"foto":"./images/cupcake.png"
},
{
"codigo":"12",
"nome":"Porções",
"foto":"./images/cupcake.png"
},
{
"codigo":"13",
"nome":"Chocolates",
"foto":"./images/cupcake.png"
}
]
},
"id":138827
}
would like to know how I take the list attribute and convert it to a List<> or C object array#.
You intend to do everything "manually" or use a library that abstracts it?
– Jéf Bueno
I’m trying with Newtonsoft.Json but I can’t find an example in the documentation
– Bruno Ferreira