var rt = JsonConvert.DeserializeObject<RootObject>(www.text);
string code = rt.Code;
value is Serializing
But multiple json objects such as:
[
{
"Code": "0002",
"Name": "Inspire #9898",
"size": "10x10",
"Company": "inspire",
"Description1": "Textured Grey HighQuality",
"Description2": "Fit For Kitchen,Bathroom and PlayArea Floor",
"Price": "250",
"Type": "1"
},
{
"Code": "0004",
"Name": "Inspire #98101",
"size": "10x10",
"Company": "inspire",
"Description1": "Textured Grey HighQuality",
"Description2": "Fit For Kitchen,Bathroom and PlayArea Floor",
"Price": "250",
"Type": "3,1"
}
]
gives error as
Additional text encountered after finished reading JSON content: ,. Path '', line 1, position 203. Newtonsoft.Json.JsonTextReader.Read () (at <97722d3abc9f4cf69f9e21e6770081b3>:0)
!!! I am not passing it to array !!!
[System.Serializable]
public class RootObject
{
public string Code { get; set; }
public string Name { get; set; }
public string size { get; set; }
public string Company { get; set; }
public string Description1 { get; set; }
public string Description2 { get; set; }
public string Price { get; set; } public string Type { get; set; }
}