Syntax Error GraphQL (1:41) Unexpected character "\\"

Hi All,

Can you please help us if you have faced the same issue.

I am trying to call DataPage request to Connect-REST service. In the Request I am converting the GraphQL to JSON string to send the request to REST service. I am getting response HTTP Status code as 400. In Dev environment its working good I am able to see the response. After migrated to UAT environment I am facing this Issue. Error Description Below


Syntax Error GraphQL (1:41) Unexpected character “\\”. 1: { mem(ignoreValFlag: true, sbscrbr:\“XXXXX\”) } }} ^

Thank you

Ramesh

Hi @RameshV17771534 ,

Is that Control Characters issue ? Backslash character \\

Or Is that JSON escape representation missing\\

If you want to validate response,

for (int pos = 0, len = theValue.length(); pos < len; ++pos) 
{
    char c = theValue.charAt(pos);
    int ascii = (int)c;

    if (ascii == 92)  // Blocks Backslash (\)
    {
        theProperty.addMessage("Not Allowed Special Character (\\). Please Remove Backslash Character.");
        return false;
    }
}
return true;

please go through below question.

Thanks,
Ashok

Hi Ashok,

I found the issue is identified due to the below DSS enabled to true.

json/escapeSpecialCharacters

Thank You,

Ramesh

Hi @RameshV17771534 ,

Oh okay, That’s great

Thanks,
Ashok