-
Notifications
You must be signed in to change notification settings - Fork 22
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
Question about SimdJsonParser and JsonValue. #36
Comments
This is a limitation/property of simdjson. Currently, the only option is to extract the necessary data from JsonValue and store it in some external data structure. Perhaps a solution for this would be what you described in #35. By the way, what is your use case? Why do you need to keep JsonValues between runs of
Definitely not a good idea. An instance of SimdJsonParser is meant to be reused within a single thread. |
For example, I have a lots of json need to parse. Each json is passed by others which I cannot know the content of json until they are passed to me. I want to speed up the whole parse process, so I created a hashmap.
Indeed, that would be a solution. I just want to know if there exists a easier way to solve it instead of creating a new API. |
Additional conversation regarding JsonValue: #35 (comment). |
I'm running code below:
And the output is
It looks like all the JsonValue share the same buffer if they are parsed by same parser.
What can I do to save the independent JsonValue for different buffer(JSON string)?
Plus, I don't think new SimdJsonParser for each JSON string is a good idea, cuz it costs performance and memory.
The text was updated successfully, but these errors were encountered: