zio / zio-json

Fast, secure JSON library with tight ZIO integration.
https://zio.dev/zio-json
Apache License 2.0
409 stars 146 forks source link

Add ZTransducer to convert from stream of Char to stream of A #10

Closed jdegoes closed 4 years ago

jdegoes commented 4 years ago

The JsonDecode type class can have a method decodeJsonTransducer, which returns a ZTransducer[Any, Exception, Char, A], which decodes character strings to values of type A.

fsvehla commented 4 years ago

Analogous to #11, this transducer would be limited to sources of either new-line delimited data, or nodes embedded in an array, am I missing some more low-level use case?

jdegoes commented 4 years ago

Just those two. If we hit them both for encoding and decoding, we'll have 99% of JSON streaming use cases