0

Please help me parse this JSON using JSON.net in c# JSON DATA

Here is Result

[{"rescode":0,"policyid":"1","Insuredid":"2606"},
{"rescode":0,"policyid":"2","Insuredid":"2607"},
{"rescode":0,"policyid":"3","Insuredid":"2608"}]
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • That JSON is invalid. Try uploading it to http://jsonlint.com/ and you will get errors. Likely it's supposed to represent an array so should have outer brackets: `[ {...}, {...} ]`. You'll need to fix your JSON before you can deserialize with a JSON serializer. Also, what JSON serializer are you trying to use? [tag:json.net]? Have you looked at [Deserialize JSON with C#](https://stackoverflow.com/questions/7895105) and [How to Deserialize JSON data?](https://stackoverflow.com/questions/18242429) – dbc May 08 '16 at 18:36

1 Answers1

0

Try this...

public class Product {

    public int Rescode {get;set;}
    public int Policyid {get;set;}
    public int InsuredId {get;set;}

}
Product deserializedProduct = JsonConvert.DeserializeObject<Product>(json);