c# format json

94

object to json c# -

using Newtonsoft.Json;

var jsonString = JsonConvert.SerializeObject(obj);

c# format json -

using Newtonsoft.Json;

private static string FormatPrettyJson(object myobject)
{
    string json = JsonConvert.SerializeObject(object, Formatting.Indented);

    return json;
}

Comments

Submit
0 Comments