string json to class c#
using Newtonsoft.Json;
var jsonString = JsonConvert.SerializeObject(obj);var result = JsonConvert.DeserializeObject<YourClass>(jsonstring);JObject json = JObject.Parse(str);var resultCon = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonStr);
//or
string json = "{\"ID\": 1, \"Name\": \"Abdullah\"}";
User user = JsonConvert.DeserializeObject<User>(json);
/*
public class User
{
public int ID { get; set; }
public string Name { get; set; }
}
*/
Also in JavaScript:
- set and get array inside cookie in javascript
- "@testing-library/jest-dom"
- how to add button react native app.js
- bajar archivos node
- array javascript django
- input radio trigger select jquery
- hrtime to milliseconds
- Drupal 8 get page node current path
- nested array loop in javascript
- fullcalendar v5 time format am/pm
- Please update your node with version 8.11.3 or greater (but not version 10)
- javascript ajax post send an object
- how to use await to console
- react gallery component
- if isset handlebars js
- ngmodel div angular 7
- mongoose save return id
- js filter items by index
- how to use function in javascript
- how pass data from body in koa js
- javascript array exists check
- android studio react native plugins
- js array find regex
- react native radio buttons