Ejemplo n.º 1
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken documentsSequence = ((JToken)inputObject["documents"]);
         if (documentsSequence != null && documentsSequence.Type != JTokenType.Null)
         {
             foreach (JToken documentsValue in ((JArray)documentsSequence))
             {
                 LanguageBatchResultItemV2 languageBatchResultItemV2 = new LanguageBatchResultItemV2();
                 languageBatchResultItemV2.DeserializeJson(documentsValue);
                 this.Documents.Add(languageBatchResultItemV2);
             }
         }
         JToken errorsSequence = ((JToken)inputObject["errors"]);
         if (errorsSequence != null && errorsSequence.Type != JTokenType.Null)
         {
             foreach (JToken errorsValue in ((JArray)errorsSequence))
             {
                 ErrorRecordV2 errorRecordV2 = new ErrorRecordV2();
                 errorRecordV2.DeserializeJson(errorsValue);
                 this.Errors.Add(errorRecordV2);
             }
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Deserialize the object
 /// </summary>
 public virtual void DeserializeJson(JToken inputObject)
 {
     if (inputObject != null && inputObject.Type != JTokenType.Null)
     {
         JToken errorsSequence = ((JToken)inputObject["errors"]);
         if (errorsSequence != null && errorsSequence.Type != JTokenType.Null)
         {
             foreach (JToken errorsValue in ((JArray)errorsSequence))
             {
                 ErrorRecordV2 errorRecordV2 = new ErrorRecordV2();
                 errorRecordV2.DeserializeJson(errorsValue);
                 this.Errors.Add(errorRecordV2);
             }
         }
     }
 }