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

Allow JSON Pointer queries on arrays and objects in On Demand #1701

Open
lemire opened this issue Aug 18, 2021 · 1 comment
Open

Allow JSON Pointer queries on arrays and objects in On Demand #1701

lemire opened this issue Aug 18, 2021 · 1 comment
Labels
on demand Related to simdjson::ondemand functionality

Comments

@lemire
Copy link
Member

lemire commented Aug 18, 2021

The JSON Pointer specification is a document-wide format. It does not have a notion of subdocument. There is not such thing as a relative query.

Between each JSON Pointer query, on the On Demand document, we reset our string buffer (the buffer used for unescaped strings). This is needed because someone could do multiple JSON Pointer queries on the same document, possibly generating a buffer overflow. By resetting the string buffer, we ensure that buffer overflows are impossible.

To achieve the same results over arrays and objects, we would need to similarly reset the string buffer between JSON Pointer calls. This would invalidate all other string references, including references outside of the array/object in question.

#1696 (comment)

@lemire lemire added the on demand Related to simdjson::ondemand functionality label Aug 18, 2021
@lemire lemire added this to the 2.0 milestone Aug 18, 2021
@lemire
Copy link
Member Author

lemire commented Aug 18, 2021

@NicolasJiaxin Marking for 2.0 at this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on demand Related to simdjson::ondemand functionality
Projects
None yet
Development

No branches or pull requests

1 participant