sirthias / borer

Efficient CBOR and JSON (de)serialization in Scala
https://sirthias.github.io/borer/
Mozilla Public License 2.0
224 stars 14 forks source link

Add `borer-refined` module #676

Closed sirthias closed 8 months ago

sirthias commented 1 year ago

which allows for T refined P to be encoded using the given Encoder[T] and decoded using the given Decoder[T], followed by the validation logic for the predicate P.

Implementation will probably similar to circe-refined.

At the time of writing refined support is Scala 3 is limited. It does work for runtime validations but for compile time verification.

windymelt commented 8 months ago

Hi, I'd like to tell you that Iltotore/iron: Strong type constraints for Scala can be alternative. Despite it brings fewer default refined types than refined, it works well (only) for Scala 3. It has simple interface.

windymelt commented 8 months ago

Oops sorry there is https://iltotore.github.io/iron/docs/modules/borer.html .

sirthias commented 8 months ago

Thannk you, @windymelt, for reminding me about this issue. I also prepare iron now over refined for Scala 3. And since the current version of borer is Scala 3 only I think this ticket can be closed...