Deserialize json array

example_2.json (947 Bytes)
_Test has thrown an exception

Source: Deserialize json array

Message: Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path ‘’, line 1, position 1.

Exception Type: JsonReaderException

Newtonsoft.Json.JsonReaderException: Error reading JArray from JsonReader. Current JsonReader item is not an array: StartObject. Path ‘’, line 1, position 1.
at Newtonsoft.Json.Linq.JArray.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JArray.Parse(String json, JsonLoadSettings settings)
at UiPath.Web.Activities.DeserializeJsonArray.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

1 Like

Any solution? I am also getting the same error

I’m getting something similar but a bit different.

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(IList1 validationErrors, ExceptionReason reason) at System.Activities.WorkflowInspectionServices.<GetActivities>d__3.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext()
at System.Linq.Enumerable.d__591.MoveNext() at System.Linq.Enumerable.<SelectManyIterator>d__172.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext() at System.Linq.Enumerable.<DistinctIterator>d__641.MoveNext()
at System.Linq.Buffer1..ctor(IEnumerable1 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()

Your probelm = “Current JsonReader item is not an array”

Replace in string panel JArray to JObject - i think will work

Actually was an issue with multiple installed packages. My issue is solved.

1 Like