simdjson
3.11.0
Ridiculously Fast JSON
|
Methods to iterate and find object fields. More...
Functions | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::start_object () noexcept |
Start an object iteration. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::start_root_object () noexcept |
Start an object iteration from the root. More... | |
simdjson_warn_unused simdjson_inline error_code | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::check_root_object () noexcept |
Checks whether an object could be started from the root. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::started_object () noexcept |
Start an object iteration after the user has already checked and moved past the {. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::started_root_object () noexcept |
Start an object iteration from the root, after the user has already checked and moved past the {. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::has_next_field () noexcept |
Moves to the next field in an object. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< raw_json_string > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::field_key () noexcept |
Get the current field's key. | |
simdjson_warn_unused simdjson_inline error_code | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::field_value () noexcept |
Pass the : in the field and move to its value. | |
simdjson_warn_unused simdjson_inline error_code | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field (const std::string_view key) noexcept |
Find the next field with the given key. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field_raw (const std::string_view key) noexcept |
Find the next field with the given key, without unescaping. More... | |
simdjson_warn_unused simdjson_inline simdjson_result< bool > | simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field_unordered_raw (const std::string_view key) noexcept |
Find the field with the given key without regard to order, and without unescaping. More... | |
Methods to iterate and find object fields.
These methods generally assume the value is actually an object; the caller is responsible for keeping track of that fact.
|
noexcept |
Checks whether an object could be started from the root.
May be called by start_root_object.
Definition at line 50 of file value_iterator-inl.h.
|
noexcept |
Find the next field with the given key.
Assumes you have called next_field() or otherwise matched the previous value.
This means the iterator must be sitting at the next key:
Key is raw JSON, meaning it will be matched against the verbatim JSON without attempting to unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may fail to match some keys with escapes (\u,
, etc.).
|
noexcept |
Find the next field with the given key, without unescaping.
This assumes object order: it will not find the field if it was already passed when looking for some other field.
Assumes you have called next_field() or otherwise matched the previous value.
This means the iterator must be sitting at the next key:
Key is raw JSON, meaning it will be matched against the verbatim JSON without attempting to unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may fail to match some keys with escapes (\u,
, etc.).
Definition at line 112 of file value_iterator-inl.h.
|
noexcept |
Find the field with the given key without regard to order, and without unescaping.
This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning.
Assumes you have called next_field() or otherwise matched the previous value.
This means the iterator must be sitting at the next key:
Key is raw JSON, meaning it will be matched against the verbatim JSON without attempting to unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may fail to match some keys with escapes (\u,
, etc.).
When find_field_unordered_raw is called, we can either be pointing at the first key, pointing outside (at the closing brace) or if a key was matched we can be either pointing right afterthe ':' right before the value (that we need skip), or we may have consumed the value and we might be at a comma or at the final brace (ready for a call to has_next_field()).
Definition at line 209 of file value_iterator-inl.h.
|
noexcept |
Moves to the next field in an object.
Looks for , and }. If } is found, the object is finished and the iterator advances past it. Otherwise, it advances to the next value.
Definition at line 95 of file value_iterator-inl.h.
|
noexcept |
Start an object iteration.
Definition at line 26 of file value_iterator-inl.h.
|
noexcept |
Start an object iteration from the root.
Definition at line 31 of file value_iterator-inl.h.
|
noexcept |
Start an object iteration after the user has already checked and moved past the {.
Does not move the iterator unless the object is empty ({}).
Definition at line 36 of file value_iterator-inl.h.
|
noexcept |
Start an object iteration from the root, after the user has already checked and moved past the {.
Does not move the iterator unless the object is empty ({}).
Definition at line 80 of file value_iterator-inl.h.