shenek / streamson

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

lib: analyser handler termination #229

Closed shenek closed 3 years ago

shenek commented 3 years ago

Right now at the end of a input data user has to manually call results function to obtain data.

It would be better if user could specify a hook function which would be called when handler terminates.

Probably it would require to extend handler trait with terminate or flush function which would be used to clean the buffered data of handler (if handler buffers something) and to trigger the hook.

shenek commented 3 years ago

I think that this is a prereq of #173 as well. The last line remains in handlers internals until it is flushed.