Skip to content

Multiple callbacks on one streaming parser? #9

Closed
@cben

Description

@cben

It seems from README / tests / code that currently one JsonStreamer expects to have exactly one .get / .get_with_conditions callback.
If one wants to extract several parts, the expected way is instantiate multiple JsonStreamer and feed same data to them all?

For our current use case, this is perfectly OK, just wanted to confirm, and have this for tracking.
In some cases single-parser-multiple-callbacks could be faster, and I expect it's doable in principle with the underlying SAX-like gem. Maybe I'll implement this one day...

(It may already be possible to abuse Conditions with complex lambda(s) but that's no fun. The goal here is independent callback blocks.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions