Deserialize JSON error

I’m trying to deserialize JSON from an API. but I’m getting the below error. I’ve seen similar issues that were resolved by re-booting and re-installing. I have tried both and the problem persists. Any ideas?


Source: Deserialize JSON

Message: Unexpected character encountered while parsing value: {. Path ‘’, line 1, position 1.

Exception Type: Newtonsoft.Json.JsonReaderException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path ‘’, line 1, position 1.
at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsString()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
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)

Have you followed the steps mentioned here -


1 Like

Thanks for your reply. I have followed these instructions still getting the error

Can you post in the shared thread in my previous post. If they have some idea about this.

what are you trying to parse exactly in JSON? can you post the input/or a part of it?

Make sure you have the UiPath.Web.Activities package installed and up to date.

All sorted now thanks. I had the variable set to the wrong type. Rookie error :roll_eyes:

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