Stream: implementers
Topic: what symbols need to be escaped in an upload
Brian Reinhold (May 16 2019 at 16:50):
What symbols in a JSON string do I need to escape, for example, how would I handle a % sign?
Vassil Peytchev (May 16 2019 at 16:53):
% doesn't need to be escaped. The only printable characters that need to be escaped are \ -> \\ and " -> \"
Brian Reinhold (May 16 2019 at 18:14):
% doesn't need to be escaped. The only printable characters that need to be escaped are \ -> \\ and " -> \"
Thank you. I just turn everything to UTF-8 and send
Vassil Peytchev (May 16 2019 at 18:30):
Non-printable characters need to be escaped. Note that ASCII non-printable character codes are equivalent to the UTF-8 ones:
\b Backspace (ascii code 08)
\f Form feed (ascii code 0C)
\n New line (ascii code 0A)
\r Carriage return (ascii code 0D)
\t Tab (ascii code 09)
Last updated: Apr 12 2022 at 19:14 UTC