This class provides a mechanism for decoding JSON data into value‐semantic objects.

Synopsis

Declared in <baljsn_decoder.h>

class Decoder;

Description

The decode methods are function templates that will decode any object that meets the requirements of a sequence, choice, or array object as defined in the bdlat_sequencefunctions, bdlat_choicefunctions, and bdlat_choicefunctions components respectively. These generic frameworks provide a common compile‐time interface for manipulating struct‐like and union‐like objects. In particular, the types generated by bas_codegen.pl provide the necessary interface and can be decoded using this component.

Member Functions

Name

Description

Decoder [constructor]

Construct a decoder object using the optionally specified basicAllocator. If basicAllocator is 0, the default allocator is used.

decode

decode overloads

decodeAny

decodeAny overloads

loggedMessages

Return messages logged during the last call to the decode method.

numUnknownElementsSkipped

Return the number of unknown elements skipped during the last decode.

Friends

Name

Description

BloombergLP::baljsn::Decoder_ElementVisitor

This class implements a visitor for decoding elements within a sequence, choice, or array type.

BloombergLP::baljsn::Decoder_DecodeImpProxy

This class provides a functor that dispatches the appropriate decodeImp method for a bdeat Dynamic type.

Created with MrDocs