class new in Git master
#include <Corrade/Utility/Json.h>
JsonIterator JSON iterator.
Iterator for JsonView, which is returned from Json::
Compared to JsonObjectIterator and JsonArrayIterator iterates all tokens in a depth-first manner instead of just the immediate children, and can go both ways, not just forward. See Tokenization and parsing process for more information about the internal representation.
Constructors, destructors, conversion operators
- JsonIterator()
- Default constructor.
- JsonIterator(JsonToken token) noexcept
- Construct from a token.
- operator bool() const explicit
- Whether the iterator is valid.
Public functions
- auto operator==(const JsonIterator& other) const -> bool
- Equality comparison.
- auto operator!=(const JsonIterator& other) const -> bool
- Non-equality comparison.
- auto operator--() -> JsonIterator&
- Advance to previous position.
- auto operator++() -> JsonIterator&
- Advance to next position.
- auto operator*() const -> JsonToken
- Dereference.
- auto operator->() const -> const JsonToken*
- Dereference.
Function documentation
Corrade:: Utility:: JsonIterator:: JsonIterator()
Default constructor.
Creates an invalid iterator, i.e. one with operator bool() returning false
.
Corrade:: Utility:: JsonIterator:: operator bool() const explicit
Whether the iterator is valid.
Returns false
if the iterator is default-constructed, returned from JsonToken::true
otherwise.
JsonIterator& Corrade:: Utility:: JsonIterator:: operator--()
Advance to previous position.
The iterator is expected to be valid and not at the begin of the token stream. Note that compared to JsonObjectIterator and JsonArrayIterator it advances in a depth-first manner instead of just the immediate children.
JsonIterator& Corrade:: Utility:: JsonIterator:: operator++()
Advance to next position.
The iterator is expected to be valid. Note that compared to JsonObjectIterator and JsonArrayIterator it advances in a depth-first manner instead of just the immediate children.
const JsonToken* Corrade:: Utility:: JsonIterator:: operator->() const
Dereference.
The iterator is expected to be valid.