simdjson 4.1.0
Ridiculously Fast JSON
Loading...
Searching...
No Matches
simdjson::dom::document Class Reference

A parsed JSON document. More...

#include <document.h>

Public Member Functions

 document () noexcept=default
 Create a document container with zero capacity.
 
 document (document &&other) noexcept=default
 Take another document's buffers.
 
documentoperator= (document &&other) noexcept=default
 Take another document's buffers.
 
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 16 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.

◆ root()

element simdjson::dom::document::root ( ) const
inlinenoexcept

Get the root element of this document as a JSON array.

Definition at line 20 of file document-inl.h.


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