How to do stream parsing?
I have tried to use the AsyncParser but I couldn't figure out how to get anything out other than a single jsobject as defined by my AST (in this case Play JSON).
Assume I have something like:
{
"name": "thing"
"elements": [{
"key": "a",
"value": "alice"
},{
"key": "b",
"value": "bob"
},
...
]
}
How can I get it so that each call to absorb will return zero or more elements?
Hi,
I'm facing to the same usecase... I will glad to know how you resolved it :) Regards
@gchauvet I didn't resolve it. To be fair I didn't spend much time looking into it but this was the only thing I wanted so gave up pretty quick.
I found jawn-fs2, this module provide jawn async parser binding to fs2 stream, which provide a functional abstraction over streaming, also I quickly inspect its code, seems it doesn't require too much work to bind, so I assume it should be relatively easy to bind to other streaming library if you have a prefer.