JSON formatting in C#

If we want to have nice formatted json output in C# we can use Newtonsoft library and write little helper method

static string GetFormatedJson(string input)
{
	var json = JObject.Parse(input);
	return json.ToString();
}
Advertisements