The idea is that you could enumerate all possible formats that could be used as the
C type with something like this:
class ContentType(val contentType: String) case object ApplicationJson extends ContentType("application/json") case object PlainText extends ContentType("text/plain") ...
But that's hugely verbose and not extensible in the right ways.
Decoder["application/json".type, A]instances, an XML library could provide
Decoder["application/xml".type, A]instances, etc.
type CsvDecoder[A] = Decoder[CsvTag, A]and never even really expose
Decoderinstance for a give content type would have the same type, regardless of the library that implements it
import io.circe.generic.auto._or by defining an Argonaut instance, but that doesn't (and shouldn't have to) matter to my code.
Decoders to work from in-memory strings, or is that just a shortcut?
Nodeonce and evaluate my expressions on this
Decodertype class you have in mind, right?
Decoderbecomes generic, something like
Tis the content type and
Athe decoded type, I have no specific companion object in which to put these default instances