Error JSON. InvalidDataContractException

Hi, i am dealing with a weird cenario.

When i have a JSON variable, i cant use the Wait for Form Task and Resume Activity, because it throws an exception.

image

How do i remove this referente to itself?

Hi ,

Could you please tell me which activity this error is thrown?

Thanks,
Arun

Hi @ArunVelaayudhanG.

Its on the “Wait for Form Task and Resume”, but this only happen when i have a JObject declared on variable panel. I Think its a reference problem, but i dont know how to manipulate these assembly references on UIPath.

are you using the variable ( JObject) ?
Where are you using that object?

You need to actually remove that variable from it as it seems that it cant be serializable, keep it string or outside of the wait activity.

The thing is that the form task retrievies a JSON string, so i need to Deserialize this json string into a json object, so i can acess the task data separately. I Dont know why UIPath doesnt make this easier, or i am doing something wrong…

Here is a image of TaskObject.Data
image

All the tutorials or snippets i have found, is about invoking the activitity, but not how to manipulate, that is bad.

Btw, thanks for your responses guys.

Is the issue resolved after deserializing and accessing?

Hi Arun, its not.

Its when the robot is executing ‘Wait for Form Task and Resume’ Activity. I think its some kind of reference problem, because this activity also uses a JObject.

can you check for all the variables of type Newtonsoft.Json.Linq.JToken? and remove if not required