BloombergLP::bdljsn::Tokenizer

Mechanism for traversing JSON data one node at a time.

Synopsis

Declared in <bdljsn_tokenizer.h>

class Tokenizer;

Description

This class provides a mechanism for traversing JSON data stored in a bsl::streambuf one node at a time and allows clients to access the data associated with that node, including its type and data value.

Type Aliases

NameDescription
IntPtr Alias for bsls::Types::IntPtr.
Uint64 Alias for bsls::Types::Uint64.

Enums

NameDescription
Unnamed enum Tokenizer constants.
ConformanceMode JSON conformance modes supported by this tokenizer.
TokenType Token types returned by the tokenizer.

Member Functions

NameDescription
Tokenizer [constructor]Create a Tokenizer object.
~Tokenizer [destructor]Destroy this object.
advanceToNextToken Move to the next token in the data stream.
allowConsecutiveSeparators Return the value of the allowConsecutiveSeparators option of this tokenizer.
allowFormFeedAsWhitespace Return the value of the allowFormFeedAsWhitespace option of this tokenizer.
allowHeterogenousArrays Return the value of the allowHeterogenousArrays option of this tokenizer.
allowNonUtf8StringLiterals Return the value of the allowNonUtf8StringLiterals option of this tokenizer.
allowStandAloneValues Return the value of the allowStandAloneValues option of this tokenizer.
allowTrailingTopLevelComma Return the value of the allowTrailingTopLevelComma option of this tokenizer.
allowUnescapedControlCharacters Return the value of the allowUnescapedControlCharacters option of this tokenizer.
conformanceMode Return the conformanceMode of this tokenizer.
currentPosition Return the offset of the current octet being tokenized.
readOffset Return the last read position relative to when reset was called.
readStatus Return the status of the last call to reloadStringBuffer().
reset Reset this tokenizer to read data from the specified streambuf.
resetStreamBufGetPointer Reset the held streambuf get pointer past the last processed byte.
setAllowConsecutiveSeparators Set the allowConsecutiveSeparators option to the specified value.
setAllowFormFeedAsWhitespace Set the allowFormFeedAsWhitespace option to the specified value.
setAllowHeterogenousArrays Set the allowHeterogenousArrays option to the specified value.
setAllowNonUtf8StringLiterals Set the allowNonUtf8StringLiterals option to the specified value.
setAllowStandAloneValues Set the allowStandAloneValues option to the specified value.
setAllowTrailingTopLevelComma Set the allowTrailingTopLevelComma option to the specified value.
setAllowUnescapedControlCharacters Set the allowUnescapedControlCharacters option to the specified value.
setConformanceMode Set the conformanceMode of this tokenizer to the specified mode.
tokenType Return the token type of the current token.
value Load the current token value into data when applicable.