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

Is there a way to stop parsing long lists of JSON objects when an object with a certain property value is found #702

Open
christianplatta1012 opened this issue Jun 9, 2024 · 0 comments

Comments

@christianplatta1012
Copy link

Question

Hi,
I have a JSON document that has as a property a list of objects which is quite long and costly to parse.
I only need one element of this list and I think it would speed things up if msgspec had a way to just stop parsing the list, when a specific object is found.
Is there any callback/hook in msgspec where I can implement such a behaviour? I think it is similar to Contstaints but with the stopping aspect when the constraint is matched.

Best regards,
Christian

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

No branches or pull requests

1 participant