Constructors
Declared in <bdljsn_json.h>
Create a Json object having the type (and the singleton value) of JsonNull. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
Json();
» more...
Create a Json object having the same value as the specified original object by moving (in constant time) the contents of original to the new JsonObject. The allocator associated with original is propagated for use in the newly-created Json object. original is left in a valid but unspecified state.
Json(bslmf::MovableRef<Json> original);
» more...
Same as the related overload above for Json.
explicit
Json(bslma::Allocator* basicAllocator);
» more...
Same as the related overload above for Json.
explicit
Json(
bdldfp::Decimal64 value,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type bool and the same value as the specified boolean. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
bool boolean,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
double value,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNumber and the specified value. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
float value,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNumber and the the specified value. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
int value,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
long value,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
long long value,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNumber and the specified value. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
unsigned int value,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
unsigned long value,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
unsigned long long value,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the same value as the specified original. Use the specified basicAllocator to supply memory.
Json(
bslmf::MovableRef<Json> original,
bslma::Allocator* basicAllocator);
» more...
Create a Json object having the type JsonArray/JsonObject/ JsonNumber and the value of the specified array/object/ number object by moving the contents of array/object/number to the new object. Optionally specify basicAllocator used to supply memory. If basicAllocator is not specified, the allocator associated with array/object/number is propagated for use in the newly-created Json object. The allocator or array/object/ number is unchanged and is otherwise left in (valid) unspecified state.
Json(
bslmf::MovableRef<JsonArray> array,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNumber and the value of the specified number object by moving the contents of number to the new object. Optionally specify basicAllocator used to supply memory. If basicAllocator is not specified, the allocator associated with number is propagated for use in the newly-created Json object. The allocator of number is unchanged and is otherwise left in (valid) unspecified state.
explicit
Json(
bslmf::MovableRef<JsonNumber> number,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
Json(
bslmf::MovableRef<JsonObject> object,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the same value as the specified original. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
Json(
Json const& original,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonArray/JsonObject/ JsonNumber and the value of the specified array/object/number. Optionally specify basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
Json(
JsonArray const& array,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNull and the same value as the specified null. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
JsonNull const& null,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type JsonNumber and the value of the specified number. Optionally specify basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
explicit
Json(
JsonNumber const& number,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
Json(
JsonObject const& object,
bslma::Allocator* basicAllocator = 0);
» more...
Same as the related overload above for Json.
explicit
Json(
std::string_view const& string,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type bsl::string and the same value as the specified string. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory. The behavior is undefined unless string is valid UTF-8 (see bdlde::Utf8Util::isValid).
explicit
Json(
char const* string,
bslma::Allocator* basicAllocator = 0);
» more...
Create a Json object having the type bsl::string and the same value as the specified string by moving (in constant time) the contents of string to the new Json object. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the allocator associated with string is propagated for use in the newly-created Json object. string is left in a valid but unspecified state. This function does not participate in overload resolution unless the specified t_STRING_TYPE is bsl::string. The behavior is undefined unless string is valid UTF-8 (see bdlde::Utf8Util::isValid).
template<class t_STRING_TYPE>
Json(
BloombergLP::bslmf::MovableRef_Deduced<t_STRING_TYPE> string,
bslma::Allocator* basicAllocator = 0,
void* = 0)
requires bsl::is_same<t_STRING_TYPE,
bsl::string>::value;
» more...
Create a Json object having the same structure as the specified initializer. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not specified, the currently installed default allocator is used to supply memory.
template<class t_JSON_INITIALIZER>
Json(
t_JSON_INITIALIZER const& initializer,
bslma::Allocator* basicAllocator = 0,
void* = 0)
requires bsl::is_same<t_JSON_INITIALIZER,
Json_Initializer>::value;
» more...