BloombergLP::baljsn

Components providing JSON encoding and decoding facilities.

Types

NameDescription
ConvertFromJsonOptions Options for converting bdljsn::Json objects to bdlat-compliant objects.
ConvertToJsonOptions Options for converting bdlat objects to bdljsn::Json.
DatumDecoderOptions This simply constrained (value-semantic) attribute class specifies options for decoding Datum objects in the JSON format. See the section for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.
DatumEncoderOptions This simply constrained (value-semantic) attribute class specifies options for encoding Datum objects in the JSON format. See the section for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes.
DatumUtil This struct provides a namespace for a suite of functions that convert between a JSON formated string and a bdld::Datum.
Decoder This class provides a mechanism for decoding JSON data into value-semantic objects. 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.
DecoderOptions Options for controlling the JSON decoding process.
DecoderOptionsUtil This struct provides a namespace for functions that set DecoderOptions to particular configurations.
Decoder_DecodeImpProxy This class provides a functor that dispatches the appropriate decodeImp method for a bdeat Dynamic type. Note that the operators provided in this class match the function signatures required of visitors decoding into compatible types.
Decoder_ElementVisitor This class implements a visitor for decoding elements within a sequence, choice, or array type. This is a component-private class and should not be used outside of this component. Note that the operators provided in this class match the function signatures required of visitors decoding into elements of compatible types.
Decoder_RequiredAttrsVisitor This class provides a functor that finds and remembers all non-optional sequence attributes.
EncodeImplUtil This component-private utility struct provides a suite of functions that encode bdlat types in the JSON format.
EncodeImplUtil_AttributeDispatcher This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts an "attribute" object that satisfies one of the bdlat type-category concepts, and an optional bdlat_TypeCategory tag type that corresponds to the attribute's bdlat type category. Each function-call-operator overload encodes a JSON representation of the specified attribute to the formatter supplied on construction.
EncodeImplUtil_AttributeVisitor This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts an "attribute" object that satisfies one of the bdlat type-category concepts, and an "attribute info" object that describes various metadata of the attribute.
EncodeImplUtil_ElementDispatcher This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts an "element" object that satisfies one of the bdlat type-category concepts, and an optional bdlat_TypeCategory tag type that corresponds to the element's bdlat type category. Each function-call-operator overload encodes a JSON representation of the specified selection to the formatter supplied on construction.
EncodeImplUtil_ElementVisitor This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts an "element" object that satisfies one of the bdlat type-category concepts.
EncodeImplUtil_SelectionDispatcher This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts a "selection" object that satisfies one of the bdlat type-category concepts, and an optional bdlat_TypeCategory tag type that corresponds to the selections's bdlat type category. Each function-call-operator overload encodes a JSON representation of the specified selection to the formatter supplied on construction.
EncodeImplUtil_SelectionVisitor This component-private class provides a function object that closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts a "selection" object that satisfies one of the bdlat type-category concepts, and a "selection info" object that describes various metadata of the selection.
EncodeImplUtil_ValueDispatcher This component-private class provides a function object used to encode values that satisfy one of the bdlat type-category concepts.
Encoder This class provides a mechanism for encoding value-semantic objects in the JSON format. The encode methods are function templates that will encode 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 accessing struct-like and union-like objects. In particular, the types generated by bas_codegen.pl provide the necessary interface and can be encoded using this component.
EncoderOptions Options for performing JSON encoding. EncodingStyle is either COMPACT or PRETTY. If EncodingStyle is COMPACT, no whitespace will be added between elements. If encoding style is PRETTY, then the InitialIndentLevel and SpacesPerLevel parameters are used to specify the formatting of the output. Note that InitialIndentLevel and SpacesPerLevel are ignored when EncodingStyle is COMPACT (this is the default). The EncodeEmptyArrays and EncodeNullElements encode empty array and null elements respectively. By default empty array and null elements are not encoded. The EncodeInfAndNaNAsStrings attribute provides users the option to encode Infinity and NaN floating point values as strings. These values do not have a valid JSON representation and by default such value will result in an encoding error. The DatetimeFractionalSecondPrecision specifies the precision of milliseconds printed with date time values. By default a precision of 3 decimal places is used. The MaxFloatPrecision and MaxDoublePrecision attributes allow specifying the maximum precision for float and double values. When not specified, or 0 is specified, the precision is determined automatically to use enough digits to ensure restoring the original binary floating point value by a reader. We recommend against setting these options: they were provided prior to the current default behavior (of choosing the shortest presentation that can be restored to the original value) being available.
EncoderTestAddress Test type EncoderTestAddress used by baljsn encoder tests.
EncoderTestChoiceWithAllCategories Test type EncoderTestChoiceWithAllCategories used by baljsn encoder tests.
EncoderTestChoiceWithAllCategoriesChoice Test type EncoderTestChoiceWithAllCategoriesChoice used by baljsn encoder tests.
EncoderTestChoiceWithAllCategoriesCustomizedType Test type EncoderTestChoiceWithAllCategoriesCustomizedType used by baljsn encoder tests.
EncoderTestChoiceWithAllCategoriesEnumeration Test type EncoderTestChoiceWithAllCategoriesEnumeration used by baljsn encoder tests.
EncoderTestChoiceWithAllCategoriesSequence Test type EncoderTestChoiceWithAllCategoriesSequence used by baljsn encoder tests.
EncoderTestDegenerateChoice1 Test type EncoderTestDegenerateChoice1 used by baljsn encoder tests.
EncoderTestDegenerateChoice1Sequence Test type EncoderTestDegenerateChoice1Sequence used by baljsn encoder tests.
EncoderTestEmployee Test type EncoderTestEmployee used by baljsn encoder tests.
EncoderTestSequenceWithAllCategories Test type EncoderTestSequenceWithAllCategories used by baljsn encoder tests.
EncoderTestSequenceWithAllCategoriesChoice Test type EncoderTestSequenceWithAllCategoriesChoice used by baljsn encoder tests.
EncoderTestSequenceWithAllCategoriesCustomizedType Test type EncoderTestSequenceWithAllCategoriesCustomizedType used by baljsn encoder tests.
EncoderTestSequenceWithAllCategoriesEnumeration Test type EncoderTestSequenceWithAllCategoriesEnumeration used by baljsn encoder tests.
EncoderTestSequenceWithAllCategoriesSequence Test type EncoderTestSequenceWithAllCategoriesSequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged0 Test type EncoderTestSequenceWithUntagged0 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged1 Test type EncoderTestSequenceWithUntagged1 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged10 Test type EncoderTestSequenceWithUntagged10 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged10Sequence Test type EncoderTestSequenceWithUntagged10Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged11 Test type EncoderTestSequenceWithUntagged11 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged11Sequence Test type EncoderTestSequenceWithUntagged11Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged11Sequence1 Test type EncoderTestSequenceWithUntagged11Sequence1 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged12 Test type EncoderTestSequenceWithUntagged12 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged12Sequence Test type EncoderTestSequenceWithUntagged12Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged13 Test type EncoderTestSequenceWithUntagged13 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged13Sequence Test type EncoderTestSequenceWithUntagged13Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged14 Test type EncoderTestSequenceWithUntagged14 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged1Sequence Test type EncoderTestSequenceWithUntagged1Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged2 Test type EncoderTestSequenceWithUntagged2 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged3 Test type EncoderTestSequenceWithUntagged3 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged3Sequence Test type EncoderTestSequenceWithUntagged3Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged3Sequence1 Test type EncoderTestSequenceWithUntagged3Sequence1 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged4 Test type EncoderTestSequenceWithUntagged4 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged4Sequence Test type EncoderTestSequenceWithUntagged4Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged5 Test type EncoderTestSequenceWithUntagged5 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged5Sequence Test type EncoderTestSequenceWithUntagged5Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged6 Test type EncoderTestSequenceWithUntagged6 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged7 Test type EncoderTestSequenceWithUntagged7 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged7Sequence Test type EncoderTestSequenceWithUntagged7Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged7Sequence1 Test type EncoderTestSequenceWithUntagged7Sequence1 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged7Sequence2 Test type EncoderTestSequenceWithUntagged7Sequence2 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged8 Test type EncoderTestSequenceWithUntagged8 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged8Sequence Test type EncoderTestSequenceWithUntagged8Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged8Sequence1 Test type EncoderTestSequenceWithUntagged8Sequence1 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged9 Test type EncoderTestSequenceWithUntagged9 used by baljsn encoder tests.
EncoderTestSequenceWithUntagged9Sequence Test type EncoderTestSequenceWithUntagged9Sequence used by baljsn encoder tests.
EncoderTestSequenceWithUntagged9Sequence1 Test type EncoderTestSequenceWithUntagged9Sequence1 used by baljsn encoder tests.
Encoder_Formatter This class implements a formatter providing operations for rending JSON text elements to an output stream (supplied at construction) according to a set of formatting options (also supplied at construction). This is a component-private class and should not be used outside of this component.
EncodingStyle Enumeration of encoding style (COMPACT or PRETTY).
Formatter This class implements a formatter providing operations for rendering JSON text elements to an output stream (supplied at construction) according to a set of formatting options (also supplied at construction).
JsonConverter This class provides a mechanism for copying the constituent values of certain bdlat-compatible objects to bdljsn::Json objects, and vice versa. In each case, the resulting object is a different representation of the data in the original. This conversion is analogous to the encoding and decoding operations provided elsewhere in this package; however, the convert methods here avoid the creation of any textual representation of the data.
JsonConverter_DecodeImpProxy This class provides a functor that dispatches the appropriate decodeImp method for a bdeat Dynamic type. Note that the operators provided in this class match the function signatures required of visitors decoding into compatible types.
JsonConverter_ElementVisitor This class implements a visitor for decoding elements within a sequence, choice, or array type. This is a component-private class and should not be used outside of this component. Note that the operators provided in this class match the function signatures required of visitors decoding into elements of compatible types.
JsonFormatter This class implements a formatter mechanism that assembles a (potentially complicated) bdljsn::Json object according to the invocations of the formatter's manipulators.
JsonFormatter_State This struct defines an enumeration of the internal states that a a JsonFormatter can reach as it processes user requests to openArray, putValue(s), closeArray, etc. These states influence the formatter and, in some build modes, detect errors in call sequences.
JsonFormatter_Util Utilities supporting JsonFormatter encoding operations.
JsonParserUtil This class provides utility functions for decoding data in the JSONformat into a bdeat Simple type. The primary method is getValue,which decodes into a specified object and is overloaded for all bdeatSimple types.
JsonTokenizer This class implements a mechanism that makes the organization and values of a non-scalar bdljsn::Json object available as a series of tokens. Some tokens have associated values. See .
JsonTokenizer_Visitor This class provides a mechanism for extracting token information from a bdljsn::Json object, transferring that information to a parent baljsn::JsonTokenizer object (which considers this visitor a friend), and, if appropriate, arranging for the visiting of a subordinate bdljsn::Json object.
ParserUtil This class provides utility functions for decoding data in the JSONformat into a bdlat Simple type. The primary method is getValue,which decodes into a specified object and is overloaded for all bdlatSimple types.
PrintUtil This struct provides functions for printing objects to output streams in JSON format.
SimpleFormatter This class implements a formatter providing operations for rendering JSON text elements to an output stream (supplied at construction) according to a set of formatting options (also supplied at construction).

Type Aliases

NameDescription
Tokenizer Alias for bdljsn::Tokenizer.

Functions

NameDescription
hashAppend hashAppend overloads
operator<< Stream insertion operators
operator== Equality operators
operator!= Inequality operators