Systran.NlpClientLib.Client.ApiClient.Deserialize C# (CSharp) Method

Deserialize() public method

Deserialize the JSON string into a proper object
public Deserialize ( string content, Type type ) : object
content string
type System.Type
return object
    public object Deserialize(string content, Type type) {
      if (type.GetType() == typeof(Object))
        return (Object)content;

      try
      {
          return JsonConvert.DeserializeObject(content, type);
      }
      catch (IOException e) {
        throw new ApiException(500, e.Message);
      }
    }