zio-json icon indicating copy to clipboard operation
zio-json copied to clipboard

Add transformation and composition operators to JsonCodec

Open jdegoes opened this issue 5 years ago • 5 comments

Just as JsonEncoder and JsonDecoder support a wide range of operators, which transform and combine codecs, so also can JsonCodec support operators, including:

  • orElse
  • orElseEither
  • zip
  • zipLeft
  • zipRight

These will have type signatures similar to the existing type signatures.

In addition, an xmapOrFail could be added, probably here and to the parent types.

jdegoes avatar Sep 24 '20 00:09 jdegoes

@jdegoes can I take this up?

afsalthaj avatar Sep 24 '20 10:09 afsalthaj

@afsalthaj of course

fsvehla avatar Sep 24 '20 12:09 fsvehla

No one is working on this, I don't think.

jdegoes avatar Dec 15 '21 18:12 jdegoes

I am going to attempt this

yisraelU avatar Dec 15 '21 21:12 yisraelU

@fsvehla The specific methods mentioned seem to be taken care of in zio2 , is there anything left to be done for this issue? edit: I see xmapOrFail is not done yet

yisraelU avatar Jan 31 '22 15:01 yisraelU