MySQL 9.0.0
Source Code Documentation
Json_boolean Class Referencefinal

Represents a JSON true or false value, type J_BOOLEAN here. More...

#include <json_dom.h>

Inheritance diagram for Json_boolean:
[legend]

Public Member Functions

 Json_boolean (bool value)
 
enum_json_type json_type () const override
 
bool value () const
 
Json_dom_ptr clone () const override
 Make a deep clone. More...
 
- Public Member Functions inherited from Json_scalar
uint32 depth () const final
 Compute the depth of a document. More...
 
bool is_scalar () const final
 
- Public Member Functions inherited from Json_dom
virtual ~Json_dom ()=default
 
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 () const
 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

bool m_v
 false or true: represents the eponymous JSON literal More...
 

Additional Inherited Members

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

Detailed Description

Represents a JSON true or false value, type J_BOOLEAN here.

Constructor & Destructor Documentation

◆ Json_boolean()

Json_boolean::Json_boolean ( bool  value)
inlineexplicit

Member Function Documentation

◆ clone()

Json_dom_ptr Json_boolean::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_boolean::json_type ( ) const
inlineoverridevirtual
Returns
the type corresponding to the actual Json_dom subclass

Implements Json_dom.

◆ value()

bool Json_boolean::value ( ) const
inline
Returns
false for JSON false, true for JSON true

Member Data Documentation

◆ m_v

bool Json_boolean::m_v
private

false or true: represents the eponymous JSON literal


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