Parse JSON String to JSON Object in C#.NET

前端 未结 4 1384
逝去的感伤
逝去的感伤 2020-12-06 04:31

I have a JSON String returned by my SOAP web service in .NET. It is as follows:

{
 \"checkrecord\":
   [
     {
      \"rollno\":\"abc2\",
      \"percentage         


        
4条回答
  •  醉话见心
    2020-12-06 05:08

    I see that this question is very old, but this is the solution I used for the same problem, and it seems to require a bit less code than the others.

    As @Maloric mentioned in his answer to this question:

    var jo = JObject.Parse(myJsonString);
    

    To use JObject, you need the following in your class file

    using Newtonsoft.Json.Linq;
    

提交回复
热议问题