BDE 4.14.0 Production release
|
Provide an attribute class for specifying JSON decoding options.
This component provides a single, simply constrained (value-semantic) attribute class, baljsn::DecoderOptions
, that is used to specify options for decoding objects in the JSON format.
maxDepth
: maximum depth of the decoded dataskipUnknownElements
: flag specifying if unknown elements are skippedvalidateInputIsUtf8
: flag specifying whether UTF-8 correctness checking is enabled.allowConsecutiveSeparators
: flag specifying if multiple consecutive separators – e.g., "a" :: 1
, [ 1,, 2 ]
– are accepted and treated as if one separator had been input.allowFormFeedAsWhitespace
: flag specifying if the form-feed character, '\f', is treaded as whitespace in addition to , '\t', 'allowUnescapedControlCharacters
: flag specifying if unescaped (raw) control characters (e.g., 'This file was generated from a script and was subsequently modified to add documentation and to make other changes. The steps to generate and update this file can be found in the doc/generating_codec_options.txt
file.
This section illustrates intended use of this component.
This component is designed to be used at a higher level to set the options for decoding objects in the JSON format. This example shows how to create and populate an options object.
First, we default-construct a baljsn::DecoderOptions
object:
Next, we populate that object to decode using a different maxDepth
value and skipUnknownElements
value: