1 #ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H
3 #ifndef SIMDJSON_CONDITIONAL_INCLUDE
4 #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H
5 #include "simdjson/generic/ondemand/base.h"
6 #include "simdjson/generic/implementation_simdjson_result_base.h"
7 #include "simdjson/generic/ondemand/value_iterator.h"
11 namespace SIMDJSON_IMPLEMENTATION {
24 simdjson_inline
object() noexcept = default;
210 static simdjson_inline
simdjson_result<
object> start(value_iterator &iter) noexcept;
211 static simdjson_inline
simdjson_result<
object> start_root(value_iterator &iter) noexcept;
212 static simdjson_inline
simdjson_result<
object> started(value_iterator &iter) noexcept;
213 static simdjson_inline
object resume(const value_iterator &iter) noexcept;
214 simdjson_inline
object(const value_iterator &iter) noexcept;
216 simdjson_warn_unused simdjson_inline
error_code find_field_raw(const std::string_view key) noexcept;
218 value_iterator iter{};
A forward-only JSON object field iterator.
simdjson_inline object() noexcept=default
Create a new invalid object.
simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
Look up a field by name on an object, without regard to key order.
simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
Consumes the object and returns a string_view instance corresponding to the object as represented in ...
simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
Look up a field by name on an object (order-sensitive).
simdjson_result< bool > is_empty() &noexcept
This method scans the beginning of the object and checks whether the object is empty.
simdjson_inline error_code consume() noexcept
Go to the end of the object, no matter where you are right now.
simdjson_result< bool > reset() &noexcept
Reset the iterator so that we are pointing back at the beginning of the object.
simdjson_result< value > at_path(std::string_view json_path) noexcept
Get the value associated with the given JSONPath expression.
simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
Get the value associated with the given JSON pointer.
simdjson_inline simdjson_result< size_t > count_fields() &noexcept
This method scans the object and counts the number of key-value pairs.
An ephemeral JSON value returned during iteration.
The top level simdjson namespace, containing everything the library provides.
error_code
All possible errors returned by simdjson.
The result of a simdjson operation that could fail.
The result of a simdjson operation that could fail.
simdjson_inline error_code error() const noexcept
The error.
simdjson_inline T & value() &noexcept(false)
Get the result value.