As per JSON specification, I am aware that leading zeroes are not allowed in integers in JSON. But as per Jackson documentation, there is a property in Jackson library i.e.
Just a note for people that are having that issue and are looking for a newer working solution:
Import latest version of fasterxml jackson in maven (2.11.0 as of today):
Create the mapper object:
ObjectMapper objectMapper = new ObjectMapper();
Allow the leading zeros for numbers (the not deprecated version):
objectMapper.enable(JsonReadFeature.ALLOW_LEADING_ZEROS_FOR_NUMBERS.mappedFeature());
used imports:
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.core.json.JsonReadFeature;
Keep in mind this will trim the leading 0s. If you want to keep them then your json value shouldn't be a numeric.