Does anyone knows a java library that could easily encode java Maps into json objects and the other way around?
UPDATE
For reasons couldn\'
JSON-Simple looks relatively easy to use (examples below).
Map to JSON:
Map map = new HashMap();
map.put("name", "foo");
map.put("nickname", "bar");
String jsonText = JSONValue.toJSONString(map);
JSON to List/Map:
String s = yourJsonString;
List list = (JSONArray) JSONValue.parse(s);
Map map = (JSONObject) list.get(0);