BriteSnow / snow

A Lightweight, Google Guice, Simple, and Powerful Web Application Framework that makes building modern Web Application a breeze! Fully open source, Apache V2 licensed.
http://britesnow.com/snow
29 stars 10 forks source link

Change default JsonLibJsonRenderer to ignore null value properties #14

Closed jeremychone closed 11 years ago

jeremychone commented 11 years ago

By default, when serializing to JSON, json-lib set "" for new string properties (when null) and :null for objects, and per the JSON spec. However, this add lot of unnecessary noises to the json that the client see.

So, we need to add a ignoreNullFilter PropertyFilter that tells the json-lib to ignore properties with new values.

jeremychone commented 11 years ago

fixed in 2.0.0-snapshot