Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documenting how one can check for the end of the document. #1907

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

lemire
Copy link
Member

@lemire lemire commented Oct 4, 2022

Fixes #1904

Copy link
Contributor

@TysonAndre TysonAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this worked for the data types I tested (string, number, array, object, boolean, null)

EDIT: For doc.is_scalar() specifically, doc.is_null() would need to be called to advance the top-level pointer when iterating over the document - e.g. in benchmark/json2msgpack/simdjson_ondemand.h

@lemire lemire merged commit 137cb14 into master Oct 5, 2022
@lemire lemire deleted the dlemire/issue1904 branch October 5, 2022 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a helper method to check if ondemand parsing has no trailing tokens after end of document?
2 participants