Ben Plommer
Ben Plommer
> Right, they are still returning JSON, so using a JSON decoder for `Unit` is fine actually (note you are paying the cost of parsing for no good reason). The...
> Hmm, yes, I think we can do this actually 🤔 we'd have to re-expose these specific implicits on the `CirceEntity{Encoder,Decoder}` objects and put the derived codecs at a lower...
> What's the issue with `String`? Are there really JSON endpoints in practice that return a raw `String` not in an object? This seems even less common :) Good point,...
> The only top-level values that are valid for `application/json` are arrays and objects (RFC4627) That makes me happier about hiding Circe's string encoder (it removes a reason not to),...
> For RFC compliance, we can replace `Encoder` with[ `Encoder.AsRoot`](https://circe.github.io/circe/api/io/circe/Encoder$$AsRoot.html) Wouldn’t that require user code to narrow static types of Circe encoders to `Encoder.AsRoot`? That seems quite disruptive and I’m...
@fredshonorio I don’t think I understand what you’re suggesting, can you expand on it a bit?
This is definitely something I'd support adding.
Actually on second thought I'm not sure whether I would. This would accord with the [robustness principle](https://en.wikipedia.org/wiki/Robustness_principle) ("be conservative in what you send and liberal in what you accept"), but...
I'm experiencing this in Scala 3.3.1 for a case where it wasn't occurring in 3.2.2.
Thanks for this! Sorry it's taken me three months to get to this, so thanks for your patience - this looks like a good improvement but do you think it's...