Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you are outputting stream data into JSON format, the data can include special characters that JSON will not accept. The following macro escapes these invalid characters. 

For exampleBy way of understanding: \b is standard notation for the backspace character. However, \ is also a special character in JSON, so we need to escape this with \\\\ to tell it that the \ should not be treated as a special character in this instance. 

...