allowComments

Allows parser to accept C/Java-style comments in JSON input.

Comments are being skipped and are not stored anywhere; this setting does not affect encoding in any way.

More specifically, a comment is a substring that is not a part of JSON key or value, conforming to one of those:

  1. Starts with // characters and ends with a newline character \n.

  2. Starts with /* characters and ends with */ characters. Nesting block comments is not supported: no matter how many /* characters you have, first */ will end the comment.

false by default.