Deserialize JSON Cannot create and populate list type Newtonsoft.Json.Linq.JToken

Hi Community,

I was trying to run the bot using Orchestrator API. It was running successfully through Uipath Studio but when I uploaded the code to the orchestrator it throws me an error below.

image

It is not able to deserialize the JSON string into JSON Object.

1 Like

@Achal_Sharma - pls try below…

Mange packages -> add json.net packcage
create a variable like jsonResults type as jobject (newtonesoft.json.jobject)
use assign activity jsonResults = JObject.Parse(responseString)
to get values - like this jsonResults(“timstamp”).ToString

1 Like

Hi @GBK

the bot is running perfectly fine on my machine. But when i am running it on different machine using orchestrator it trowing my an error discussed above.

I am using the same step as you have mentioned above.

pls check the package is available on orchestrator…

1 Like

@Achal_Sharma - pls check the newtonsoft.json / json.net packages are available in orchestrator packages folder… if not - pls manully upload and try…

1 Like

@GBK - newtonsoft.json package available in orchestrator.

pls upload json.net package aswell and try.

Hello guys, I have the same issue.
Deserialize JSON: Cannot create and populate list type Newtonsoft.Json.Linq.JToken. Path ‘facets’, line 1, position 11.
The whole process is running perfectly on my dev unit(studio) also on a community orchestrator, but when I migrate the process on a VM (azure) I receive the error.
Till now I’ve moved every packages from my unit C:\Users\user name.nuget\packages to the VM…but I still receive the same error.

Notice that for the VM I use a 2nd Orchestrator (Licenced) v.2019.10.4

For me its working fine if I am using it as an individual project. But its throwing the error if I am invoking it in a particular project. Has anyone found any solution?

Hi Community,

This was happening because of multiple version of JSON were been used in the project.

Means, I was using the uipath.web.activities and uipath.gsuite.activities and both of them using different Newtonsoft.Json version, that why it was unable the deserialize.

So, to resolve this we have to keep the same version of Newtonsoft.Json in the project.

Regards
Achal Sharma

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.