0

I have json POST request with the following {"token":"abcd","m":"n"} where as the java bean holds:

@XmlRootElement
class Token {

    public String token;

}

On using Genson, it is not throwing UnrecognizedPropertyException which otherwise happen if i remove Genson dependency from pom.xml

gjosh
  • 135
  • 3
  • 18
  • I am Gensons author, at the moment it will swallow them silently, I opened an issue few time ago https://github.com/owlike/genson/issues/13, I'll try to get it in the next release this month. – eugen Sep 09 '14 at 10:12

1 Answers1

1

In latest Genson release 1.1, you have now an option in the builder to fail if no property matches:

new GensonBuilder().failOnMissingProperty(true).create();
eugen
  • 5,856
  • 2
  • 29
  • 26