cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Manc_Gurl
Helper IV
Helper IV

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
Helper IV
Helper IV

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
Frequent Visitor
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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,873)