Using the new System.Json from 4.5 or equivalent System. Json for 4.0 from Nuget , how do you format the output so that it is indented ans, located in a more readable form?
So this is
dynamic jsonObj = new JsonObject(); jsonObj.firstName = "John"; jsonObj.lastName = "Smith"; Debug.WriteLine((string)jsonObj.ToString());
Displays this
{"firstName":"John","lastName":"Smith"}
When i want this
{ "firstName": "John", "lastName": "Smith" }
source share