Sunday, 15 February 2015

Parse RESTFul API in C# / .NET -


I have ASP restored to use in windows applications. I have no idea that I can get the proper output How can i parse {"Id": "8", "name": "ravi", "email": "ravi.com", "time": "11- 12 "," appointment_date ":" 2015-04-02 00:00:00 "}]," success ": true}

above is my JSON output Please remove this problem Help me out

Thanks in advance!

You can use NewtonSoft here is an example of a document

Has a class account

  public class account {public string email {get; Set; } Public Bull Active {get; Set; } Created public date time {receive; Set; } Public IList & lt; String & gt; Roles (get; set;}}  

and want to make json in the bottom of an account object:

  string json = @ "{' Email ':' james @ example com ',' active ': true,' created date ':' 2013-01-20 to 00: 00: 00 ',' roles': ['user', 'admin']} " ; Account Account = JsonConvert.DeserializeObject & lt; Account & gt; (json); Console.WriteLine (account.Email);  

Newtonsoft with JSON See the following questions about parsing json.

Newtonsoft JSON Jason Net for Realization But there are several options.


No comments:

Post a Comment