Example #1
0
 /// <summary>
 /// Processes the specified input.
 /// </summary>
 /// <param name="input">The input.</param>
 /// <param name="targetType">Type of the target.</param>
 /// <returns></returns>
 public override object Process(string input, Type targetType)
 {
     using (var reader = File.OpenText(input))
     {
         return(Json2.Parse(reader, targetType));
     }
 }
Example #2
0
 /// <summary>
 /// Create a dictionary from the string.
 /// </summary>
 /// <param name="input">The input.</param>
 /// <returns></returns>
 protected override IDictionary <string, object> FromString(string input)
 {
     return(Json2.ParseAs <IDictionary <string, object> >(input));
 }