Julien Richard-Foy

Results 388 comments of Julien Richard-Foy

I’m not a big fan of full auto derivation to be honest. I think it’s better to explicitly show what is going to be serialized (ie every type `X` that...

I have the same problem. Is there any known workaround?

Hm, the first snippet of code should work as is. I will investigate why it doesn’t. In the meantime, it seems that you can workaround the issue as follows: ```...

The last example you gave (`RuleJson`) should work. Here, the problem is that the recursivity is on a leaf, and not on the hierarchy root type. I’m still thinking of...

Thanks @mikail-khan for the report. Unfortunately, I’m not sure what I can do here. It seems that typeclass derivation doesn’t scale to such large type hierarchies :-/

I didn’t try Magnolia. I guess it should be possible to transition to Magnolia while keeping the same user-facing API. But more important to me is the compatibility with Scala...

Interesting, I’m happy to move to Magnolia if it provides a nice API that works both on Scala 2 and Scala 3!

Indeed, the documentation is outdated, we must update it. Maybe the following works? ```scala implicit def reads[X](implicit derivedReads: Lazy[DerivedReads[ApiEventV1, X]]): Reads[ApiEventV1] = derivedReads.value.reads(customTypeTagRead, NameAdapter.snakeCase) ``` However, maybe in your case...

If I remember well it’s a limitation of `knownDirectSubclasses`. I think this PR https://github.com/scala/scala/pull/5284 fixed the issue, though. Are you using Scala 2.12?