I'm trying to decode JSON from a CakePHP web service on Windows CE 6 in C#. An example of the JSON is:
"{
"response":
[
{
"Asset":
{
"name":"La Riviera","assetnumber":"16151","assettype":"Art","assignedlocation":"HOUSTON","currentlocation":"HOUSTON","properties":
{
"Tag ID":"2331221","Last Seen":"","Status":"MISSING","Sold":"0","Layaway":"0","Artist":"Corbiere","Size":"80x80 cm","Calibration Date":""
}
}
},
{
"Asset":
{
"name":"Port de Centuri-edit","assetnumber":"16150","assettype":"Art","assignedlocation":"HOUSTON","currentlocation":"HOUSTON","properties":
{
"Tag ID":"3741923","Last Seen":"","Status":"MISSING","Sold":"1","Layaway":"0","Artist":"Corbiere","Size":"80x80 cm","Calibration Date":"2013-01-12"
}
}
}
]
}"
I'd like to get this into a Dictionary-like object, perhaps Dictionary so that it can be accessed like
string name = json["response"][0]["Asset"]["name"];
I'm able to do this on the PC using JSON.net's LINQ JObject class and JObject.Parse, however these don't seem to work on CE. Any suggestions for a library that will do this? I'd rather not have to build specific classes for the JSON to be stuffed into for each and every situation.