![]() |
simdjson 4.6.4
Ridiculously Fast JSON
|
A document_reference is a thin wrapper around a document reference instance. More...
#include <document.h>
Public Member Functions | |
| simdjson_inline | document_reference (document &d) noexcept |
| simdjson_inline | document_reference (const document_reference &other) noexcept=default |
| simdjson_inline document_reference & | operator= (const document_reference &other) noexcept=default |
| simdjson_inline void | rewind () noexcept |
| simdjson_inline simdjson_result< array > | get_array () &noexcept |
| simdjson_inline simdjson_result< object > | get_object () &noexcept |
| simdjson_inline simdjson_result< uint64_t > | get_uint64 () noexcept |
| The document_reference instances are used primarily/solely for streams of JSON documents. | |
| simdjson_inline simdjson_result< uint64_t > | get_uint64_in_string () noexcept |
| simdjson_inline simdjson_result< int64_t > | get_int64 () noexcept |
| simdjson_inline simdjson_result< int64_t > | get_int64_in_string () noexcept |
| simdjson_inline simdjson_result< uint32_t > | get_uint32 () noexcept |
| simdjson_inline simdjson_result< int32_t > | get_int32 () noexcept |
| simdjson_inline simdjson_result< double > | get_double () noexcept |
| simdjson_inline simdjson_result< double > | get_double_in_string () noexcept |
| simdjson_inline simdjson_result< std::string_view > | get_string (bool allow_replacement=false) noexcept |
| template<typename string_type > | |
| simdjson_warn_unused simdjson_inline error_code | get_string (string_type &receiver, bool allow_replacement=false) noexcept |
| simdjson_inline simdjson_result< std::string_view > | get_wobbly_string () noexcept |
| simdjson_inline simdjson_result< raw_json_string > | get_raw_json_string () noexcept |
| simdjson_inline simdjson_result< bool > | get_bool () noexcept |
| simdjson_inline simdjson_result< value > | get_value () noexcept |
| simdjson_inline simdjson_result< bool > | is_null () noexcept |
| template<typename T > | |
| simdjson_inline simdjson_result< T > | get () &noexcept |
| template<typename T > | |
| simdjson_inline simdjson_result< T > | get () &&noexcept |
| template<typename T > | |
| simdjson_warn_unused simdjson_inline error_code | get (T &out) &noexcept |
| Get this value as the given type. | |
| template<typename T > | |
| simdjson_inline error_code | get (T &out) &&noexcept |
| simdjson_inline simdjson_result< std::string_view > | raw_json () noexcept |
| simdjson_inline | operator document & () const noexcept |
| template<class T > | |
| simdjson_inline | operator T () noexcept(false) |
| simdjson_inline | operator array () &noexcept(false) |
| simdjson_inline | operator object () &noexcept(false) |
| simdjson_inline | operator uint64_t () noexcept(false) |
| simdjson_inline | operator int64_t () noexcept(false) |
| simdjson_inline | operator double () noexcept(false) |
| simdjson_inline | operator std::string_view () noexcept(false) |
| simdjson_inline | operator raw_json_string () noexcept(false) |
| simdjson_inline | operator bool () noexcept(false) |
| simdjson_inline | operator value () noexcept(false) |
| simdjson_inline simdjson_result< size_t > | count_elements () &noexcept |
| simdjson_inline simdjson_result< size_t > | count_fields () &noexcept |
| simdjson_inline simdjson_result< value > | at (size_t index) &noexcept |
| simdjson_inline simdjson_result< array_iterator > | begin () &noexcept |
| simdjson_inline simdjson_result< array_iterator > | end () &noexcept |
| simdjson_inline simdjson_result< value > | find_field (std::string_view key) &noexcept |
| simdjson_inline simdjson_result< value > | find_field (const char *key) &noexcept |
| simdjson_inline simdjson_result< value > | operator[] (std::string_view key) &noexcept |
| simdjson_inline simdjson_result< value > | operator[] (const char *key) &noexcept |
| simdjson_result< value > | operator[] (int) &noexcept=delete |
| simdjson_inline simdjson_result< value > | find_field_unordered (std::string_view key) &noexcept |
| simdjson_inline simdjson_result< value > | find_field_unordered (const char *key) &noexcept |
| simdjson_inline simdjson_result< json_type > | type () noexcept |
| simdjson_inline simdjson_result< bool > | is_scalar () noexcept |
| simdjson_inline simdjson_result< bool > | is_string () noexcept |
| simdjson_inline simdjson_result< const char * > | current_location () noexcept |
| simdjson_inline int32_t | current_depth () const noexcept |
| simdjson_inline bool | is_negative () noexcept |
| simdjson_inline simdjson_result< bool > | is_integer () noexcept |
| simdjson_inline simdjson_result< number_type > | get_number_type () noexcept |
| simdjson_inline simdjson_result< number > | get_number () noexcept |
| simdjson_inline simdjson_result< std::string_view > | raw_json_token () noexcept |
| simdjson_inline simdjson_result< value > | at_pointer (std::string_view json_pointer) noexcept |
| simdjson_inline simdjson_result< value > | at_path (std::string_view json_path) noexcept |
| template<typename Func > | |
| simdjson_inline error_code | for_each_at_path_with_wildcard (std::string_view json_path, Func &&callback) noexcept |
| template<> | |
| simdjson_inline simdjson_result< array > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< object > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< raw_json_string > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< std::string_view > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< double > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< uint64_t > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< int64_t > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< uint32_t > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< int32_t > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< bool > | get () &noexcept |
| template<> | |
| simdjson_inline simdjson_result< value > | get () &noexcept |
A document_reference is a thin wrapper around a document reference instance.
The document_reference instances are used primarily/solely for streams of JSON documents. They differ from document instances when parsing a scalar value (a document that is not an array or an object). In the case of a document, we expect the document to be fully consumed. In the case of a document_reference, we allow trailing content.
Definition at line 842 of file document.h.
|
noexcept |
Definition at line 749 of file document-inl.h.
|
noexcept |
Definition at line 750 of file document-inl.h.
|
noexcept |
Definition at line 820 of file document-inl.h.
|
noexcept |
Definition at line 840 of file document-inl.h.
|
noexcept |
Definition at line 839 of file document-inl.h.
|
noexcept |
Definition at line 821 of file document-inl.h.
|
noexcept |
Definition at line 818 of file document-inl.h.
|
noexcept |
Definition at line 819 of file document-inl.h.
|
noexcept |
Definition at line 833 of file document-inl.h.
|
noexcept |
Definition at line 832 of file document-inl.h.
|
noexcept |
Definition at line 822 of file document-inl.h.
|
noexcept |
Definition at line 824 of file document-inl.h.
|
noexcept |
Definition at line 823 of file document-inl.h.
|
noexcept |
Definition at line 828 of file document-inl.h.
|
noexcept |
Definition at line 827 of file document-inl.h.
|
noexcept |
Definition at line 847 of file document-inl.h.
|
inlinenoexcept |
Definition at line 882 of file document.h.
|
noexcept |
Definition at line 794 of file document-inl.h.
|
noexcept |
Definition at line 795 of file document-inl.h.
|
noexcept |
Definition at line 796 of file document-inl.h.
|
noexcept |
Definition at line 797 of file document-inl.h.
|
noexcept |
Definition at line 798 of file document-inl.h.
|
noexcept |
Definition at line 799 of file document-inl.h.
|
noexcept |
Definition at line 800 of file document-inl.h.
|
noexcept |
Definition at line 801 of file document-inl.h.
|
noexcept |
Definition at line 802 of file document-inl.h.
|
noexcept |
Definition at line 803 of file document-inl.h.
|
noexcept |
Definition at line 804 of file document-inl.h.
|
inlinenoexcept |
Definition at line 869 of file document.h.
|
inlinenoexcept |
Get this value as the given type.
Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value
Be mindful that the document instance must remain in scope while you are accessing object, array and value instances.
| out | This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. |
Definition at line 905 of file document.h.
|
noexcept |
Definition at line 752 of file document-inl.h.
|
noexcept |
Definition at line 791 of file document-inl.h.
|
noexcept |
Definition at line 784 of file document-inl.h.
|
noexcept |
Definition at line 785 of file document-inl.h.
|
noexcept |
Definition at line 778 of file document-inl.h.
|
noexcept |
Definition at line 770 of file document-inl.h.
|
noexcept |
Definition at line 771 of file document-inl.h.
|
noexcept |
Definition at line 837 of file document-inl.h.
|
noexcept |
Definition at line 836 of file document-inl.h.
|
noexcept |
Definition at line 753 of file document-inl.h.
|
noexcept |
Definition at line 790 of file document-inl.h.
|
noexcept |
Definition at line 786 of file document-inl.h.
|
noexcept |
Definition at line 788 of file document-inl.h.
|
noexcept |
Definition at line 772 of file document-inl.h.
|
noexcept |
The document_reference instances are used primarily/solely for streams of JSON documents.
We decided that calling 'get_double()' on the JSON document '1.233 blabla' should give an error, so we check for trailing content.
However, for streams of JSON documents, we want to be able to start from "321" "321" "321" and parse it successfully as a stream of JSON documents, calling get_uint64_in_string() successfully each time.
To achieve this result, we pass a 'false' to a get_root_value_iterator() method: this indicates that we allow trailing content.
Definition at line 768 of file document-inl.h.
|
noexcept |
Definition at line 769 of file document-inl.h.
|
noexcept |
Definition at line 792 of file document-inl.h.
|
noexcept |
Definition at line 789 of file document-inl.h.
|
noexcept |
Definition at line 835 of file document-inl.h.
|
noexcept |
Definition at line 834 of file document-inl.h.
|
noexcept |
Definition at line 793 of file document-inl.h.
|
noexcept |
Definition at line 830 of file document-inl.h.
|
noexcept |
Definition at line 831 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator array | ( | ) | & |
Definition at line 808 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator bool | ( | ) |
Definition at line 815 of file document-inl.h.
|
noexcept |
Definition at line 849 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator double | ( | ) |
Definition at line 812 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator int64_t | ( | ) |
Definition at line 811 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator object | ( | ) | & |
Definition at line 809 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator raw_json_string | ( | ) |
Definition at line 814 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator std::string_view | ( | ) |
Definition at line 813 of file document-inl.h.
|
explicit |
Definition at line 807 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator uint64_t | ( | ) |
Definition at line 810 of file document-inl.h.
| simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::operator value | ( | ) |
Definition at line 816 of file document-inl.h.
|
noexcept |
Definition at line 826 of file document-inl.h.
|
noexcept |
Definition at line 825 of file document-inl.h.
|
noexcept |
Definition at line 848 of file document-inl.h.
|
noexcept |
Definition at line 838 of file document-inl.h.
|
noexcept |
Definition at line 751 of file document-inl.h.
|
noexcept |
Definition at line 829 of file document-inl.h.