MySQL  8.0.18
Source Code Documentation
Json_string Class Referencefinal

Represents a JSON string value (ECMA), of type J_STRING here. More...

#include <json_dom.h>

Inheritance diagram for Json_string:
Json_scalar Json_dom

Public Member Functions

template<typename... Args>
 Json_string (Args &&... args)
 
enum_json_type json_type () const override
 
Json_dom_ptr clone () const override
 Make a deep clone. More...
 
const std::string & value () const
 Get the reference to the value of the JSON string. More...
 
size_t size () const
 Get the number of characters in the string. More...
 
- Public Member Functions inherited from Json_scalar
uint32 depth () const final override
 Compute the depth of a document. More...
 
bool is_scalar () const final override
 
- Public Member Functions inherited from Json_dom
virtual ~Json_dom ()
 
void * operator new (size_t size, const std::nothrow_t &) noexcept
 Allocate space on the heap for a Json_dom object. More...
 
void operator delete (void *ptr) noexcept
 Deallocate the space used by a Json_dom object. More...
 
void operator delete (void *ptr, const std::nothrow_t &) noexcept
 Nothrow delete. More...
 
Json_containerparent () const
 Get the parent dom to which this dom is attached. More...
 
virtual bool is_number () const
 
Json_path get_location ()
 Get the path location of this dom, measured from the outermost document it nests inside. More...
 
bool seek (const Json_seekable_path &path, size_t legs, Json_dom_vector *hits, bool auto_wrap, bool only_need_one)
 Finds all of the json sub-documents which match the path expression. More...
 

Private Attributes

std::string m_str
 holds the string More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Json_dom
static Json_dom_ptr parse (const char *text, size_t length, const char **errmsg, size_t *offset)
 Parse Json text to DOM (using rapidjson). More...
 
static Json_dom_ptr parse (const THD *thd, const json_binary::Value &v)
 Construct a DOM object based on a binary JSON value. More...
 

Detailed Description

Represents a JSON string value (ECMA), of type J_STRING here.

Constructor & Destructor Documentation

◆ Json_string()

template<typename... Args>
Json_string::Json_string ( Args &&...  args)
inlineexplicit

Member Function Documentation

◆ clone()

Json_dom_ptr Json_string::clone ( ) const
inlineoverridevirtual

Make a deep clone.

The ownership of the returned object is henceforth with the caller.

Returns
a cloned Json_dom object.

Implements Json_dom.

◆ json_type()

enum_json_type Json_string::json_type ( ) const
inlineoverridevirtual
Returns
the type corresponding to the actual Json_dom subclass

Implements Json_dom.

◆ size()

size_t Json_string::size ( ) const
inline

Get the number of characters in the string.

Returns
the number of characters

◆ value()

const std::string& Json_string::value ( ) const
inline

Get the reference to the value of the JSON string.

Returns
the string reference

Member Data Documentation

◆ m_str

std::string Json_string::m_str
private

holds the string


The documentation for this class was generated from the following file: