Set the allowTrailingTopLevelComma option to the specified value.
Synopsis
Declared in <bdljsn_tokenizer.h>
Tokenizer&
setAllowTrailingTopLevelComma(bool value);
Description
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().
Return Value
a non‐`const` reference to this tokenizer
Parameters
Name |
Description |
value |
new value for |
Created with MrDocs