Problem with parsing a Json with invalid characters


I have a string that I am trying to parse into a json:

When I parse it, I get the error:
Assign: Unexpected character encountered while parsing value: @. Path ‘’, line 0, position 0.

I understand that the ‘@’ indicates that it’s some kind of raw string and shouldn’t actually be included in any output, so then why am I unable to parse it?

I’ve tried to remove the @ with substring, remove even replace but I cannot remove it (again, I understand that it doesn’t actually ‘exist’ in the string, yet I am desperate for a solution).

Thanks a lot for your help!


Can you share your string a file using WriteTextFile activity?


json.txt (1.9 KB)


Can you try the following expression?

strJson = strJson.Trim({"@"c,""""c,Chr(10),Chr(13)}).Replace("""""","""") (3.2 KB)


1 Like

It works when outputting it to a message box:

but when the string is parsed as a jObject, it still gives the error

Did you run the above sample : ?
It works in deserialize to JObject without error.


Thank worked @Yoichi! Thank you so much, you are a king


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