Unable to deserialise JSON getting the error:Deserialize JSON: Value cannot be null. Parameter name: value

hI All,
I have used a simple http request and would like to deserailize it, howver i am getting this error and dont know what to do:

exception error details:
RemoteException wrapping System.ArgumentNullException: Value cannot be null.
Parameter name: value
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value,
Type type,
JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value,
JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at UiPath.Web.Activities.DeserializeJson`1.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)

Hey @Tata_Subramanian

Please give us a screenshot of HTTP Request and Deserialize JSON Activities.

Also, I recommend you hide your response data from your attached screenshot.

Best,

Hello,
First I recommend to print the response in output or write it in the file before deserialise as it maybe the error returned from API itself so you need first to make sure from API response then we can check what is the next step.

thanks, its now working!!! i saved output of the response to a string and now its working.

I am happy to know that and please if your see my answer solved your question please mark it as solution :slight_smile:

The API is not working for me, I have attached the screenshots so you can help me.


Do you have VSTEResponse in the Output/Response content property of the HTTP Request?

YES

Do you have a variable in the output property of the Deserialize JSON activity?