# Deserialize Json including Json Array failed

**URL:** <https://forum.uipath.com/t/deserialize-json-including-json-array-failed/67254>\
**Category:** Help\
**Tags:** activities, webapi\
**Created:** [September 27, 2018, 8:16am UTC](https://forum.uipath.com/t/deserialize-json-including-json-array-failed/67254 "2018-09-27T08:16:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cunama](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/cunama/32/292149_2.png) [@cunama](https://forum.uipath.com/u/cunama)\
**Post date:** [September 27, 2018, 8:16am UTC](https://forum.uipath.com/t/deserialize-json-including-json-array-failed/67254/1 "2018-09-27T08:16:26Z")

</div>

Dear all,

I just find that the deserialize Json activity cannot process a Json object with Json Array, is there someone who can help on this?

Here are my sample json message including an array for reference:

```auto
{
  "success": true,
  "fpdm": "发票代码",
  "fplx": "发票类型",
  "fphm": "发票号码",
  "kprq": "开票日期",
  "xfMc": "销售方名称",
  "xfNsrsbh": "销售方纳税人识别号",
  "xfContact": "销售方联系方式",
  "xfBank": "销售方开户行",
  "gfMc": "购方名称",
  "gfNsrsbh": "购方纳税人识别号",
  "gfContact": "购方联系方式",
  "gfBank": "购方开户行",
  "code": "发票校验码",
  "num": "发票机器码",
  "del": "是否作废",
  "taxamount": "税额合计",
  "goodsamount": "价格合计",
  "sumamount": "价税合计",
  "quantityAmount": "数量合计",
  "updateTime": "更新时间",
  "remark": "备注",
  "goodsData": [
    {
      "name": "名称",
      "spec": "规格",
      "unit": "单位",
      "amount": "数量",
      "priceUnit": "单价",
      "priceSum": "金额",
      "taxRate": "税率",
      "taxSum": "税额"
    }
  ]
}

```

Update:  
I just found that I need to use the jsonconvert.deserializeObject method to deserialize the json to my type of object. So the coming question is I need to import my custom class. Anyone can help? Thanks!

---

<div class="post-metadata">

**Author:** ![kwoxer](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kwoxer/32/96026_2.png) [@kwoxer](https://forum.uipath.com/u/kwoxer)\
**Post date:** [September 23, 2019, 9:27am UTC](https://forum.uipath.com/t/deserialize-json-including-json-array-failed/67254/2 "2019-09-23T09:27:01Z")

</div>

I have the same issue. I get this one:

> Message: The following errors were encountered while processing the workflow tree:  
> ‘StartBackup’: The private implementation of activity ‘1: StartBackup’ has the following validation error: Compiler error(s) encountered processing expression “configTEST”.  
> Der Wert vom Typ “Newtonsoft.Json.Linq.JArray” kann nicht in “Newtonsoft.Json.Linq.JArray” konvertiert werden. Der Typenkonflikt könnte auf das Mischen eines Dateiverweises auf “C:\Users\decurmos.nuget\packages\newtonsoft.json\12.0.3-beta1\lib\net45\Newtonsoft.Json.dll” in Projekt “vbhost” mit einem Dateiverweis auf “C:\Users\decurmos\AppData\Local\UiPath\app-19.8.0\Newtonsoft.Json.dll” in Projekt “vbhost” zurückzuführen sein. Wenn die beiden Assemblys identisch sind, ersetzen Sie die beiden Verweise durch Verweise vom gleichen Speicherort.
> 
> Exception Type: System.Activities.InvalidWorkflowException
> 
> RemoteException wrapping System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:  
> ‘StartBackup’: The private implementation of activity ‘1: StartBackup’ has the following validation error: Compiler error(s) encountered processing expression “configTEST”.  
> Der Wert vom Typ “Newtonsoft.Json.Linq.JArray” kann nicht in “Newtonsoft.Json.Linq.JArray” konvertiert werden. Der Typenkonflikt könnte auf das Mischen eines Dateiverweises auf “C:\Users\decurmos.nuget\packages\newtonsoft.json\12.0.3-beta1\lib\net45\Newtonsoft.Json.dll” in Projekt “vbhost” mit einem Dateiverweis auf “C:\Users\decurmos\AppData\Local\UiPath\app-19.8.0\Newtonsoft.Json.dll” in Projekt “vbhost” zurückzuführen sein. Wenn die beiden Assemblys identisch sind, ersetzen Sie die beiden Verweise durch Verweise vom gleichen Speicherort.
> 
> at System.Activities.Validation.ActivityValidationServices.ThrowIfViolationsExist(IList`1 validationErrors, ExceptionReason reason) at System.Activities.WorkflowInspectionServices.<GetActivities>d__3.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()  
> at System.Linq.Enumerable.d\_\_59`1.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()  
> at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__64`1.MoveNext()  
> at System.Linq.Buffer`1..ctor(IEnumerable`1 source)  
> at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)  
> at UiPath.Executor.Tracking.TrackingHelpers.GetVariableNames(Activity activity)  
> at UiPath.Executor.Tracking.TrackingHelpers.TrackVariables(TrackingProfile profile, WorkflowInfo workflowInfo)  
> at UiPath.Executor.Tracking.DebugTrackingParticipant.RegisterWorkflow(WorkflowInfo workflowInfo)  
> at UiPath.Executor.DebuggerPlugin.UiPath.Executor.IDebuggerPlugin.RegisterWorkflowTracking(WorkflowInfo workflowInfo)  
> at UiPath.Executor.Tracking.WorkflowTracking.RegisterWorkflowTracking(WorkflowInfo workflowInfo)  
> at UiPath.Executor.WorkflowRuntime.RegisterWorkflow(WorkflowInfo workflowInfo)  
> at UiPath.Executor.RobotRunner.InitWorkflowApplication()  
> at UiPath.Executor.RobotRunner.d\_\_76.MoveNext()
