Create a Json object holding the specified string.

Synopsis

Declared in <bdljsn_json.h>

explicit
Json(
    char const* string,
    bslma::Allocator* basicAllocator = 0);

Description

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).

Parameters

Name

Description

string

UTF‐8 string value to store

basicAllocator

memory allocator; null uses the default

Created with MrDocs