You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great work! I can't wait to get my hand dirty with this. Just curious (and might be a stupid question), can I use the same API and path syntax to mutate or patch a nested value in an Ion stream?
Thanks,
Peter
The text was updated successfully, but these errors were encountered:
The path extractor works on top of an IonReader which is only able to read the Ion stream. Another problem is that the path extractor optimizes the traversal by skipping values that have won't match any search path. It'd be cumbersome to try to leverage it as a stream transformer.
The path extractor is more suited for a sparse read use case which could be combined with a transform. For example it's suited for reading a limited number of struct fields from an Ion stream and performing a transform on them but not reading all fields and only performing a transform in a limited number of them.
I can see what you are asking as a another tool that using the same search path syntax. It'd traverse the whole document writing values to a provided OutputStream and invoking a callback with an IonReader and an IonWriter for registered search paths. Users would be in charge of writing the value, or transformed value, for matched search paths. Won't benefit from skip scanning as it'd need to read all the stream, but could leverage the stream copy writers to get better performance.
I'm curious to hear more on your use case this could be a tool worh supporting. At the bare minimum we'd be happy to lend a hand on a community owned tool :)
Hi Ion team,
Great work! I can't wait to get my hand dirty with this. Just curious (and might be a stupid question), can I use the same API and path syntax to mutate or patch a nested value in an Ion stream?
Thanks,
Peter
The text was updated successfully, but these errors were encountered: