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
First: Good job with JsonSurfer! It's a helpful tool, for sure.
I am looking for a way to read from a large JSON file in a streaming fashion and write an excerpt from that file to a new file in a streaming fashion. The onValue method of the JsonPathListener receives an Object which was obtained in a streaming manner. This is great, but at that point the full Object is loaded in memory. Would it be possible to specify an OutputStream to a SurfingConfiguration, such that the matching portions of the incoming file could be written to the stream instead of memory?
Actually, I really need a different OutputStream for every excerpt that is matched by the specified JSON Path. Perhaps a new SurfingConfiguration.setStreamHandler method would receive a new OutputStreamHandler interface that two methods: OutputStream onNewOutput(ParsingContext context) and void end(OutputStream out)... or something. There are a few ways to do it, I'm sure.
Maybe there is already support for something like this. I looked but couldn't find any.
The text was updated successfully, but these errors were encountered:
I certainly understand the limited free time. No problem. This issue isn't urgent, currently, but if it becomes urgent I might look into contributing to the project. Thanks.
First: Good job with JsonSurfer! It's a helpful tool, for sure.
I am looking for a way to read from a large JSON file in a streaming fashion and write an excerpt from that file to a new file in a streaming fashion. The
onValue
method of theJsonPathListener
receives anObject
which was obtained in a streaming manner. This is great, but at that point the fullObject
is loaded in memory. Would it be possible to specify anOutputStream
to aSurfingConfiguration
, such that the matching portions of the incoming file could be written to the stream instead of memory?Actually, I really need a different
OutputStream
for every excerpt that is matched by the specified JSON Path. Perhaps a newSurfingConfiguration.setStreamHandler
method would receive a newOutputStreamHandler
interface that two methods:OutputStream onNewOutput(ParsingContext context)
andvoid end(OutputStream out)
... or something. There are a few ways to do it, I'm sure.Maybe there is already support for something like this. I looked but couldn't find any.
The text was updated successfully, but these errors were encountered: