BloombergLP::bdljsn::Json_Initializer

Component-private helper that captures values for JSON list-initialization.

Synopsis

Declared in <bdljsn_json.h>

class Json_Initializer;

Description

This component-private class is designed capture a set of values that can be used to initialize a Json object, or an element in a JsonArray, or the "value" portion of a JsonObject member. This class is not modifiable, and (except for small types like int) does not own the objects that it holds. The purpose here is to enable list-initialization (including nested lists) of Json, JsonArray, and JsonObject objects. The lifetime of a Json_Initializer object should not exceed that of list-initialization expression because pointers held here would no longer be valid.

Type Aliases

NameDescription
Storage Variant type used to store the captured initializer value.

Member Functions

NameDescription
Json_Initializer [constructor]Constructors
get_storage Return a reference providing non-modifiable access to the internal variant.