This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Jackson returns property even if it is null.  RSS feed

 
alex friday
Ranch Hand
Posts: 55
  • 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!