Skip to content

Option to error on unrecognized fields #9

@dhasenan

Description

@dhasenan

Let's say I have a model:

class Foo {
  int myValue;
}

And a json file:

{ "myvalue" = 7 }

Morph will happily deserialize this without errors, even though I got the name of the field wrong ("myvalue" versus "myValue"). It will create a Foo with myValue set to 0. This can be confusing. An option to error on unrecognized fields would let me catch this mistake sooner.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions