Skip to content

JSON parsing of overlapping oneof keys #1117

@sttawm

Description

@sttawm

Would it make sense for the JSON parser to complain if multiple fields of a oneof are defined?

Or maybe the compiler could be configured to generate code (a Reads[T]) that complains if the oneof is oversubscribed?

I looked into passing a custom formatter via .registerMessageFormatter to gain access to the e.g. JValue before passing it along to the default parser, but I don't have access to a default parser, and I don't want to have to specify a writer as well.

I may be able to take a pass at it if this could be helpful to others or if there's a suggested way to handle this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions