Gson gson = new Gson();
Map<String,Object> map = new HashMap<String, Object>();
map.put("a",1);
map.put("b",null);
System.out.println(gson.toJson(map));; //prints {"a":1}
how do I get it to include all entries? Thank you
Gson gson = new Gson();
Map<String,Object> map = new HashMap<String, Object>();
map.put("a",1);
map.put("b",null);
System.out.println(gson.toJson(map));; //prints {"a":1}
how do I get it to include all entries? Thank you
http://sites.google.com/site/gson/gson-user-guide#TOC-Null-Object-Support
Gson gson = new GsonBuilder().serializeNulls().create();
RTFM !