Class
parsers::json::Array
A JSON array token, templated on its backing storage S: Array<std::vector<Node>> (OwnedArray) owns its elements, Array<std::span<const Node>> (ArrayView) views elements stored elsewhere with no copy.
Move-only; both backings read uniformly via value().
Template parameters
S | the element storage: std::vector<Node> (owning) or std::span<const Node> (viewing). |
Functions
fn
Array · 3 overloads
Construct from the backing storage (moved in).
Parameters
value | the element storage (an owning vector or a non-owning span). |
Complexity
O(1) — a vector move or a span copy; the elements are never copied.
Allocation
none.
fn
operator= · 2 overloads
Move-assign, taking over the other array's storage.
Parameters
other | the array to move from. |
Returns
reference to this array.
Read the elements uniformly as a view, whether owned or viewed (no setter).
Returns
a std::span<const Node> over the array's elements.
Complexity
O(1).
Allocation
none.
