1 #ifndef SIMDJSON_DOM_ARRAY_H
2 #define SIMDJSON_DOM_ARRAY_H
4 #include "simdjson/dom/base.h"
5 #include "simdjson/internal/tape_ref.h"
16 simdjson_inline
array() noexcept;
21 using difference_type = std::ptrdiff_t;
45 inline bool operator==(
const iterator& other)
const noexcept;
47 inline bool operator<(
const iterator& other)
const noexcept;
48 inline bool operator<=(
const iterator& other)
const noexcept;
49 inline bool operator>=(
const iterator& other)
const noexcept;
50 inline bool operator>(
const iterator& other)
const noexcept;
56 simdjson_inline
iterator(
const internal::tape_ref &tape) noexcept;
57 internal::tape_ref tape;
78 inline
size_t size() const noexcept;
127 simdjson_inline
array(const internal::tape_ref &tape) noexcept;
128 internal::tape_ref tape;
132 friend class
simdjson::internal::string_builder;
149 #if SIMDJSON_EXCEPTIONS
152 inline size_t size()
const noexcept(
false);
160 #if defined(__cpp_lib_ranges)
166 inline constexpr
bool enable_view<simdjson::dom::array> =
true;
167 #if SIMDJSON_EXCEPTIONS
169 inline constexpr
bool enable_view<simdjson::simdjson_result<simdjson::dom::array>> =
true;
bool operator!=(const iterator &other) const noexcept
Check if these values come from the same place in the JSON.
iterator & operator++() noexcept
Get the next value.
value_type operator*() const noexcept
Get the actual value.
size_t number_of_slots() const noexcept
Get the total number of slots used by this array on the tape.
iterator end() const noexcept
One past the last array element.
size_t size() const noexcept
Get the size of the array (number of immediate children).
simdjson_result< element > at(size_t index) const noexcept
Get the value at the given index.
simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
Get the value associated with the given JSON pointer.
simdjson_inline array() noexcept
Create a new, invalid array.
iterator begin() const noexcept
Return the first array element.
The top level simdjson namespace, containing everything the library provides.
error_code
All possible errors returned by simdjson.
The result of a JSON navigation that may fail.
The result of a simdjson operation that could fail.