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;
24 using iterator_category = std::forward_iterator_tag;
48 inline bool operator==(
const iterator& other)
const noexcept;
50 inline bool operator<(
const iterator& other)
const noexcept;
51 inline bool operator<=(
const iterator& other)
const noexcept;
52 inline bool operator>=(
const iterator& other)
const noexcept;
53 inline bool operator>(
const iterator& other)
const noexcept;
59 simdjson_inline
iterator(
const internal::tape_ref &tape) noexcept;
60 internal::tape_ref tape;
81 inline
size_t size() const noexcept;
130 simdjson_inline
array(const internal::tape_ref &tape) noexcept;
131 internal::tape_ref tape;
135 friend class
simdjson::internal::string_builder;
152 #if SIMDJSON_EXCEPTIONS
155 inline size_t size()
const noexcept(
false);
163 #if defined(__cpp_lib_ranges)
169 inline constexpr
bool enable_view<simdjson::dom::array> =
true;
170 #if SIMDJSON_EXCEPTIONS
172 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.
reference 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.