pureconfig
pureconfig copied to clipboard
Support a simpler form of manual derivation
With #420 support was added for manual derivation. This mode requires one to explicitly enumerate the field names like
implicit val personReader = ConfigReader.forProduct2("name", "surname")(Person(_, _))
It would be easier if we can avoid listing the field names explicitly. We can use an approach similar to one taken in spray-json which enables creating custom formats for case classes like
object MyJsonProtocol extends DefaultJsonProtocol {
implicit val colorFormat = jsonFormat4(Color)
}
This would enable one to avoid using shapeless based approach with lesser effort and still benefit from not having any significant impact on compile times.