JSON is a bit more complex than the general format, like arrays, there are multiple layers of nesting, studied, the record code is as follows:
stringJsontext ="{' name ': ' Test ', ' phone ': ' 18888888888 ', ' image ': [{' Name ': ' Img1 ', ' data ': ' data1 '},{' name ': ' Img2 ', ' data ': ' Data2 ' },{' name ': ' Img3 ', ' data ': ' Data3 '}]}"; Jobject Jo=(Jobject) jsonconvert.deserializeobject (Jsontext); stringZone = jo["name"]. ToString (); stringZone_en = jo["Phone"]. ToString (); Jarray Jar= Jarray.parse (jo["Image"]. ToString ()); MessageBox.Show (zone); MessageBox.Show (zone_en); for(vari =0; I < jar. Count; i++) {Jobject J=Jobject.parse (Jar[i]. ToString ()); MessageBox.Show (j["name"]. ToString ()); MessageBox.Show (j["Data"]. ToString ()); }
The key is to use the jarray.parse.
C # JSON extracts multiple layers nested into arrays--C # JSON arrays