Replies: 2 comments 5 replies
-
|
Can you elaborate ? Maybe with an example and some JSON ? (It saves time when we understanding exactly what everyone means.) |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
While iterating through JSON, you can also call get_raw_token() on any value, which gives you a start offset and a "maximum length" (which includes the entire string / double in the case of scalars, as well as any trailing whitespace). Since it returns a pointer into the original buffer, you can easily get the offset from that. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First off, I just stumbled upon simdjson this afternoon and it looks awesome!
I have a perhaps somewhat unique application where rather than parsing a JSON document and extracting field values, I instead need to extract field value offsets (start and end ideally). After looking through the examples and API documentation I don't see any mention of position or offsets. Is it possible to extract field value offset information with simdjson?
Beta Was this translation helpful? Give feedback.
All reactions