How to Build Custom JSON Using JSON.Net
The serializer from JSON.Net is really good, and the default output from JsonConvert.SerializeObject will work for most situations, but sometimes you want fine control over the structure of your JSON. Fortunately, JSON.Net also includes an API for building out custom JSON. You will need the Nuget package Newtonsoft.Json and add the namespace Newtonsoft.Json.Linq. To start, create a new JObject that will represent the root of the JSON. Call the Add method to add properties to the JSON....