Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ROQTEduardo_Lar
New Member

We found an invalid escape sequence in JSON input

Hello! i'm having a problem with a connection, when i try connect with an API, the return a DataFormat.Error, this error is caused because have a value using a invalid character "\'" and i can't remove this one. Is there a way to change this?
Thank you for help!

Erro fomato do dado.png

7 REPLIES 7
lbendlin
Super User
Super User

likely you ae making the Web.Contents call and the JSON.Document step at the same time. Separate these steps.

 

Show your sanitized Power Query code.

ROQTEduardo_Lar
New Member

Hello! yes, i have a sample. WhatsApp Image 2023-03-17 at 11.05.07.jpeg

so it's not the backslash that's the issue - it's the escaped single quote. Since your "observation"  string uses double quotes this single quote escape is not necessary.  Either change the setting in the source (to not escape single quotes) or add a process step to replace "\'" with "'".

understand! But in this case i can't change the setting in the source and it is not possible add a process to replace this character.
So i need another way to input this information!

and it is not possible add a process to replace this character.

Why not?  That can be done in Power Query.

Because, when i make the connection it's return me an error.

lbendlin
Super User
Super User

Please show a sample of the return payload.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors