shenek / streamson

Memory efficient handling of large JSON data.
MIT License
4 stars 0 forks source link

streamson-bin: terminate after first match #139

Open shenek opened 4 years ago

shenek commented 3 years ago

perhaps terminate after n-th math would be more reasonable

shenek commented 3 years ago

Probably the best way to implement it is via matcher property.

The question is what to do with the remaining input stream. It can be terminated or read. Both situation make a bit sense. If data came from a socket it would be wise to read it all so that socket can be reused. If data came from a pipe it makes sense to close it immediately.

shenek commented 3 years ago

Note that this can be also used do e.g. split even / odd records to multiple files / sockets / pipes

But there is one more thing to consider, currently. trigger, extract strategy are actually hitting all matcher while convert, filter will hit only the first matcher

shenek commented 3 years ago

related to #197