/// <summary> /// Converts a generic object to JSON /// </summary> public static string ObjectToJson(object obj) { DynValue v = ObjectValueConverter.SerializeObjectToDynValue(null, obj, JsonNull.Create(), JsonEmptyArray.Create()); StringBuilder sb = new StringBuilder(); ValueToJson(sb, v); return(sb.ToString()); }
/// <summary> /// Converts a generic object to JSON /// </summary> public static string ObjectToJson(object obj) { DynValue v = ObjectValueConverter.SerializeObjectToDynValue(null, obj, JsonNull.Create()); return(JsonTableConverter.TableToJson(v.Table)); }