Exemplo n.º 1
0
 public deserializer(JSONParameters param)
 {
     _params = param;
 }
Exemplo n.º 2
0
 /// <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));
 }
Exemplo n.º 3
0
 /// <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));
 }
Exemplo n.º 4
0
        /// <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));
        }