simdjson  3.11.0
Ridiculously Fast JSON
simdjson::dom Namespace Reference

A DOM API on top of the simdjson parser. More...

Classes

class  array
 JSON array. More...
 
class  document
 A parsed JSON document. More...
 
class  document_stream
 A forward-only stream of documents. More...
 
class  element
 A JSON element. More...
 
class  object
 JSON object. More...
 
class  key_value_pair
 Key/value pair in an object. More...
 
class  parser
 A persistent document parser. More...
 

Enumerations

enum class  element_type {
  ARRAY = '[' , OBJECT = '{' , INT64 = 'l' , UINT64 = 'u' ,
  DOUBLE = 'd' , STRING = '"' , BOOL = 't' , NULL_VALUE = 'n'
}
 The actual concrete type of a JSON element This is the type it is most easily cast to with get<>. More...
 

Functions

template<>
simdjson_result< std::string_view > element::get< std::string_view > () const noexcept
 
bool is_pointer_well_formed (std::string_view json_pointer) noexcept
 
std::ostream & operator<< (std::ostream &out, element_type type)
 
std::ostream & operator<< (std::ostream &out, simdjson::dom::element value)
 Print JSON to an output stream. More...
 
std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::element > x)
 
std::ostream & operator<< (std::ostream &out, simdjson::dom::array value)
 Print JSON to an output stream. More...
 
std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::array > x)
 
std::ostream & operator<< (std::ostream &out, simdjson::dom::object value)
 Print JSON to an output stream. More...
 
std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::object > x)
 

Detailed Description

A DOM API on top of the simdjson parser.

Enumeration Type Documentation

◆ element_type

The actual concrete type of a JSON element This is the type it is most easily cast to with get<>.

Enumerator
ARRAY 

dom::array

OBJECT 

dom::object

INT64 

int64_t

UINT64 

uint64_t: any integer that fits in uint64_t but not int64_t

DOUBLE 

double: Any number with a "." or "e" that fits in double.

STRING 

std::string_view

BOOL 

bool

NULL_VALUE 

null

Definition at line 14 of file element.h.

Function Documentation

◆ operator<<() [1/3]

std::ostream & simdjson::dom::operator<< ( std::ostream &  out,
simdjson::dom::array  value 
)
inline

Print JSON to an output stream.

Parameters
outThe output stream.
valueThe array.
Exceptions
ifthere is an error with the underlying output stream. simdjson itself will not throw.

Definition at line 38 of file serialization-inl.h.

◆ operator<<() [2/3]

std::ostream & simdjson::dom::operator<< ( std::ostream &  out,
simdjson::dom::element  value 
)
inline

Print JSON to an output stream.

Parameters
outThe output stream.
valueThe element.
Exceptions
ifthere is an error with the underlying output stream. simdjson itself will not throw.

Definition at line 27 of file serialization-inl.h.

◆ operator<<() [3/3]

std::ostream & simdjson::dom::operator<< ( std::ostream &  out,
simdjson::dom::object  value 
)
inline

Print JSON to an output stream.

Parameters
outThe output stream.
valueThe object.
Exceptions
ifthere is an error with the underlying output stream. simdjson itself will not throw.

Definition at line 49 of file serialization-inl.h.