Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I am assuming you are not using <a href="http://www.newtonsoft.com/json" rel="noreferrer">Json.NET</a> (Newtonsoft.Json NuGet package). If this the case, then you should try it.</p> <p>It has the following features:</p> <ol> <li>LINQ to JSON</li> <li>The JsonSerializer for quickly converting your .NET objects to JSON and back again</li> <li>Json.NET can optionally produce well formatted, indented JSON for debugging or display</li> <li>Attributes like JsonIgnore and JsonProperty can be added to a class to customize how a class is serialized</li> <li>Ability to convert JSON to and from XML</li> <li>Supports multiple platforms: .NET, Silverlight and the Compact Framework</li> </ol> <p>Look at the <a href="http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_JsonConvert.htm" rel="noreferrer">example</a> below. In this example, <a href="http://www.newtonsoft.com/json/help/html/T_Newtonsoft_Json_JsonConvert.htm" rel="noreferrer"><code>JsonConvert</code></a> class is used to convert an object to and from JSON. It has two static methods for this purpose. They are <a href="http://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_JsonConvert_SerializeObject.htm" rel="noreferrer"><code>SerializeObject(Object obj)</code></a> and <a href="http://www.newtonsoft.com/json/help/html/M_Newtonsoft_Json_JsonConvert_DeserializeObject__1.htm" rel="noreferrer"><code>DeserializeObject&lt;T&gt;(String json)</code></a>: </p> <pre><code>Product product = new Product(); product.Name = "Apple"; product.Expiry = new DateTime(2008, 12, 28); product.Price = 3.99M; product.Sizes = new string[] { "Small", "Medium", "Large" }; string json = JsonConvert.SerializeObject(product); //{ // "Name": "Apple", // "Expiry": "2008-12-28T00:00:00", // "Price": 3.99, // "Sizes": [ // "Small", // "Medium", // "Large" // ] //} Product deserializedProduct = JsonConvert.DeserializeObject&lt;Product&gt;(json); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload