It tries to decode an AmqpEnvelope.payload
into a case class determined by the parameter [A].
It tries to decode an AmqpEnvelope.payload
into a case class determined by the parameter [A].
For example:
import fs2._ val json = """ { "two": "the two" } """ val envelope = AmqpEnvelope(1, json, AmqpProperties.empty) val p = Stream(envelope).covary[IO] through jsonDecode[IO, Person] p.run.unsafeRunSync
The result will be a tuple (Either
of Error
and A
, DeliveryTag
)
Stream-based Json Decoder that exposes only one method as a streaming transformation using
fs2.Pipe
and depends on the Circe library.