Closed hseeberger closed 11 years ago
Well, my experience tells me that in most cases you'd like to generate actual valid JSON instead of potentially generating fragments containing raw values without an object or array around them. The purpose of RootJsonFormat is to ensure you only produce valid top-level JSON documents.
I only ever use JsonFormat for non-toplevel field values that serialize to a single value, like dates, timestamps, etc.
Does this argument make sense to you or do you think the client library should not enforce this?
Ah, you're right. Thanks!
In
LowPriorityDefaultRiakSerializerImplicits
:Do you really need a
RootJsonWriter
? Wouldn't aJsonWriter
suffice?I ran into an issue, because I like to annotate my public members:
Only when deleting the type annotation or changing it to
RootJsonFormat
my code compiled.