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
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,462)