Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

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!

7 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello! yes, i have a sample.

    • lbendlin's avatar
      lbendlin
      Super User

      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 "'".

      • Anonymous's avatar
        Anonymous
        Not applicable

        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!

  • 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.