コード例 #1
0
 /// <summary>
 /// See interface docs.
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="resolver"></param>
 /// <returns></returns>
 public string Serialise(object obj, TypeFormatterResolver resolver)
 {
     return(JsonConvert.SerializeObject(
                obj,
                JsonSerialiserSettingsCache.Fetch(resolver)
                ));
 }
コード例 #2
0
 /// <summary>
 /// See interface docs.
 /// </summary>
 /// <param name="modelType"></param>
 /// <param name="resolver"></param>
 /// <param name="jsonText"></param>
 /// <returns></returns>
 public object Deserialise(Type modelType, TypeParserResolver resolver, string jsonText)
 {
     return(JsonConvert.DeserializeObject(
                jsonText,
                modelType,
                JsonSerialiserSettingsCache.Fetch(resolver)
                ));
 }