Getting Error in Deserialize JSON Activity

Hello,

Getting Error in Deserialize JSON activity. Error Screenshot as below

Hi @ashwinipundkar

Could you add screenshots of the variables you use in the activity? I believe you might have to change the type of the output variable to JObject instead of JToken.

Hello @loginerror

Input datatype is string and output is JsonObject

TypeArgument is Newtonsoft.Json.linq.JObject

PFB

VoltasJSONVariables

Does it work with JArray as the type Argument? (or, the Deserialize JSON Array activity)?

The error message could not be more clear here, I think → It finds an JArray but is forced to save it to another variable type (JObject is therefore not the right answer).

Could you maybe post a sample JSON that you feed into this activity?

Hi @loginerror,

PFB Input string -

Thanks, I’ll have a look.

I removed it just in case it contains some sensitive information.

It actually worked for me as it should:

Could you maybe try with a simply hard coded input like so:
image

"{""input"":""string""}"

Just to see if it will parse it correctly:
image

Hello @loginerror

Trial code worked for me too. But input which i have sent you befoer is not working…

For the previous input, I did one change before running it in Studio. I noticed that it looks like that (the quotes):

{“SiebelMessage”: (...)

So I did a find replace on all the quotes to get to this:

{"SiebelMessage":

Could this possibly be what causes the issue for you?

Hello @loginerror

Can you please check attached sample workflow.First Deserialize activity working but second Deserialize activity is not working for different input.Please check…

1 Like

Surprisingly, it worked for me without any issue.

Could you maybe try this:

  1. Save this file you sent me to a separate folder (not in your current project directory, some other directory on the Desktop)
  2. Open the XAML file → It will open new Studio project
  3. The UiPath.Web.Activity package will be missing → Install the missing package
  4. Run the project in this fresh, new project.

It should work, and then it would mean that there was some corruption in your current project.

2 Likes

hello @loginerror,

This worked ,After changing project folder it worked without error .Thanks for resolving this issue with instant reply…

Regards,
Ashwini Pundkar

1 Like

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