[#BloombergLP-bdljsn-Tokenizer-setAllowTrailingTopLevelComma]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Tokenizer.adoc[Tokenizer]::setAllowTrailingTopLevelComma
:relfileprefix: ../../../
:mrdocs:

Set the `allowTrailingTopLevelComma` option to the specified `value`&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;tokenizer&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/Tokenizer.adoc[Tokenizer]&
setAllowTrailingTopLevelComma(bool value);
----

== Description

Return a non&hyphen;`const` reference to this tokenizer&period; If the `allowTrailingTopLevelComma` value is `true` this tokenizer will successfully tokenize JSON values where a comma follows the top&hyphen;level JSON element&period; If the option&apos;s value is `false` then the tokenizer will reject documents with such trailing commas, such as `&lcub;&rcub;,`&period; By default, the value of the `allowTrailingTopLevelComma` option is `true` for backwards compatibility&period; Note that a document without any JSON elements is invalid whether or not it contains commas&period; The behavior is undefined unless `e&lowbar;RELAXED &equals;&equals; conformanceMode()`&period;

== Return Value

a non&hyphen;`const` reference to this tokenizer

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| new value for `allowTrailingTopLevelComma`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
