public deserializer(JSONParameters param) { _params = param; }
/// <summary> /// Create an object of type from the json with parameter override on this call /// </summary> /// <param name="json"></param> /// <param name="type"></param> /// <param name="par"></param> /// <returns></returns> public static object ToObject(string json, Type type, JSONParameters par) { return(new deserializer(par).ToObject(json, type)); }
/// <summary> /// Create a typed generic object from the json with parameter override on this call /// </summary> /// <typeparam name="T"></typeparam> /// <param name="json"></param> /// <param name="param"></param> /// <returns></returns> public static T ToObject <T>(string json, JSONParameters param) { return(new deserializer(param).ToObject <T>(json)); }
/// <summary> /// Create an object from the json with parameter override on this call /// </summary> /// <param name="json"></param> /// <param name="param"></param> /// <returns></returns> public static object ToObject(string json, JSONParameters param) { return(new deserializer(param).ToObject(json, null)); }
/// <summary> /// Create a formatted json string (beautified) from an object /// </summary> /// <param name="obj"></param> /// <param name="param"></param> /// <returns></returns> public static string ToNiceJSON(object obj, JSONParameters param) { string s = ToJSON(obj, param); return(Beautify(s, param.FormatterIndentSpaces)); }