I\'m using the JSON library NewtonSoft to generate a JSON string:
JObject out = JObject.FromObject(new { typ = \"photos\"
Here's a one-liner to minify JSON that you only have a string for:
var myJson = "{\"type\" :\"photos\" }"; JObject.Parse(myJson).ToString(Newtonsoft.Json.Formatting.None)
Output:
{"type":"photos"}