private static string Format(object o) { JsonTextWriter writer = new JsonTextWriter(); JsonConvert.Export(o, writer); return writer.ToString(); }