Answers for "c# how to read values of parsed json"

C#
0

parse json C#

dynamic stuff = JsonConvert.DeserializeObject("{ 'Name': 'Jon Smith', 'Address': { 'City': 'New York', 'State': 'NY' }, 'Age': 42 }");
string name = stuff.Name;
string address = stuff.Address.City;
// Or using Newtonsoft.Json.Linq 
dynamic stuff = JObject.Parse("{ 'Name': 'Jon Smith', 'Address': { 'City': 'New York', 'State': 'NY' }, 'Age': 42 }");
string name = stuff.Name;
string address = stuff.Address.City;
Posted by: Guest on August-05-2021
-1

parse json c#

using Newtonsoft.Json.Linq;

var res = "{'name': 'bob'}";
var Answer = JObject.Parse(res);
Console.Write(Answer);
Posted by: Guest on March-15-2022

Code answers related to "c# how to read values of parsed json"

C# Answers by Framework

Browse Popular Code Answers by Language