cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manc_Gurl
Resolver I
Resolver I

Invalid JSON. An unrecognized escape sequence '\T' was found in a JSON string value.

I have recently starting getting the error "Invalid JSON. An unrecognized escape sequence '\T' was found in a JSON string value." on one of my flows. This seems to be intermittent, it fails sometimes.  

 

The part of the flow that is failing is in a send HTTP request to SharePoint action which I am using to update a document set details.  I am wondering if the T in the error message refers to my Transmittal Type field which is a choice field that I am storing the value of in a string variable.  This is odd though because it does work on some transmittals with T in the transmittal type field so I'm a bit confused.

Manc_Gurl_0-1641378572573.png

 

Below is the screenshot of the send http request action

Manc_Gurl_1-1641378624468.png

Manc_Gurl_2-1641378669005.png

 

I checked the variable for the Transmittal Type after the flow has run/failed and it is stored as T so looks fine.  Not sure where to go from here

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @Manc_Gurl ,

 

The backslash (\) is a special character in  JSON. JSON use it to escape special characters in strings and in order to represent a backslash correctly in strings you have to prepend another backslash to it.

 

vxiaochenmsft_0-1641540461954.png

 

 

replace(your string, '\','\\')

Or

replace(your string, '\','/')

 

Best Regards,

Wearsky

View solution in original post

3 REPLIES 3
Manc_Gurl
Resolver I
Resolver I

Update to this, I've just noticed that the error is in fact caused by the description field, the user has entered some text with a \ between two works so I assume this is the cause.  The question is, how do I fix that so it doesn't happen in future?

Jezter12
Resolver I
Resolver I
v-xiaochen-msft
Community Support
Community Support

Hi @Manc_Gurl ,

 

The backslash (\) is a special character in  JSON. JSON use it to escape special characters in strings and in order to represent a backslash correctly in strings you have to prepend another backslash to it.

 

vxiaochenmsft_0-1641540461954.png

 

 

replace(your string, '\','\\')

Or

replace(your string, '\','/')

 

Best Regards,

Wearsky

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,873)