Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

438
Views
Jackson module with @JsonProperty defaultValue handling

I am using spring boot with jackson to create a rest api. I know that @JsonProperty annotation has defaultValue field. In it's javadoc its said:

textual default value defined as metadata. NOTE: core databind does NOT make any use of this value; it is currently only exposed to extension modules.

So I found some modules for jackson on maven central repository, however I couldn't find anyware information about which extension I should use to enable defaultValue handling.

Is there such module?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

As per the documentations of JsonProperty , the defaultValue property may be used to document expected default value. They have added this property in version 2.5. And as per their view

It is possible that in future this annotation could be used for value defaulting, and especially for default values of Creator properties,since they support {@link #required()} in 2.6 and above.

As of now till version 2.8 we are not able to use this annotation to set default value. Here we may rely on Java to have default values for member variables.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!