Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jackson returns property even if it is null.  RSS feed

 
Alex Ardoin
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to retrieve {"status":201} in the case of route!=0 but I am getting {"status":201,"distance":0.0} how can I reach that with @JsonInclude or Jackson also without "distance":0.0?



SDBean class:



Best,
TheOcean
 
SaurabhRc Jain
Greenhorn
Posts: 12
Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using class Double instead of primitive double.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!