Skip to content

Add way of rejecting input with extra keys #165

@wsong

Description

@wsong

If I have a case class like:

case class FoobarClass(optional_value: Option[String] = None)

And I receive input like:

"{"optional_valeu": "test"}" (note that "optional_value" is misspelled)

It'd be nice to be able to throw an exception immediately instead of silently using the default value for optional_value. Is there a way to do this without defining my own RootJsonFormat?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions