#StackBounty: #java #jackson #objectmapper Throw error if strings are not double quoted while using jackson objectmapper deserialization

Bounty: 100

I have a JSON:

{
    "stringField" : 1234,
    "booleanField": true,
    "numberField": 1200.00
}

I use object mapper to deserialize the json into:-

@Data
Class SomeClass {
    String stringField;
    boolean booleanField;
    float numberField;
}

I would like the objectMapper to throw an error because, the values for String fields must be double quoted according to the json spec. How can i get objectMapper to throw an error?


Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.