Support renaming fields
Currently there is no way to override field names.
Should this be implemented with an implicit context or through annotations that look the same as the ones in Jackson and JAXB
I'm not sure if this solution based on annotation is a good idea - what in case when we would like to serialize an object of 3rd party class?
you raise a very good point. So we should provide a type of implicit formats but that works with macros?
I haven't any experience with macros yet. But because implicits are resolved also at compile time, typeclasses may work..
We need to verify such possibility.
I've got quite a bit working with macros. but things like typehints, renaming fields etc not yet. We can resolve implicits at compile time with macros, like here: https://github.com/json4s/muster/blob/master/core/src/main/scala/muster/consumer.scala#L197
This already leverages the type class pattern for doing it. What I'm proposing here is extra stuff to not have to write a full custom serializer (typeclass) but instead get some of those convenience things in another type of context object or something. Maybe it's too much I don't really know :)