BloombergLP::bdljsn::Tokenizer::setAllowTrailingTopLevelComma

Set the allowTrailingTopLevelComma option to the specified value and return a non-const reference to this tokenizer. If the allowTrailingTopLevelComma value is true this tokenizer will successfully tokenize JSON values where a comma follows the top-level JSON element. If the option's value is false then the tokenizer will reject documents with such trailing commas, such as {},. By default, the value of the allowTrailingTopLevelComma option is true for backwards compatibility. Note that a document without any JSON elements is invalid whether or not it contains commas. The behavior is undefined unless e_RELAXED == conformanceMode().

Synopsis

Declared in <bdljsn_tokenizer.h>

Tokenizer&
setAllowTrailingTopLevelComma(bool value);