mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Update basics.md
This commit is contained in:
+2
-1
@@ -1110,7 +1110,8 @@ for (auto val : doc) {
|
||||
std::cout << doc.current_location() << std::endl; // Throws OUT_OF_BOUNDS
|
||||
```
|
||||
|
||||
Conversely, if `doc.current_location()` succeeds, then the document has more content.
|
||||
Conversely, if `doc.current_location().error() == simdjson::SUCCESS`,
|
||||
then the document has more content.
|
||||
|
||||
Finally, the `current_location()` method may also be used even when no exceptions/errors
|
||||
are thrown. This can be helpful for users that want to know the current state of iteration during parsing. For example:
|
||||
|
||||
Reference in New Issue
Block a user