simdjson  0.3.1
Ridiculously Fast JSON
Public Member Functions | List of all members
simdjson::dom::document Class Reference

A parsed JSON document. More...

Public Member Functions

 document () noexcept=default
 Create a document container with zero capacity. More...
 
 document (document &&other) noexcept=default
 Take another document's buffers. More...
 
document & operator= (document &&other) noexcept=default
 Take another document's buffers. More...
 
element root () const noexcept
 Get the root element of this document as a JSON array.
 

Detailed Description

A parsed JSON document.

This class cannot be copied, only moved, to avoid unintended allocations.

Definition at line 318 of file document.h.

Constructor & Destructor Documentation

◆ document() [1/2]

simdjson::dom::document::document ( )
defaultnoexcept

Create a document container with zero capacity.

The parser will allocate capacity as needed.

◆ document() [2/2]

simdjson::dom::document::document ( document &&  other)
defaultnoexcept

Take another document's buffers.

Parameters
otherThe document to take. Its capacity is zeroed and it is invalidated.

Member Function Documentation

◆ operator=()

document& simdjson::dom::document::operator= ( document &&  other)
defaultnoexcept

Take another document's buffers.

Parameters
otherThe document to take. Its capacity is zeroed.

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