"library to encode/decode from json to java.util.map?" Code Answer

2

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);
By Jose Kj on September 9 2022

Answers related to “library to encode/decode from json to java.util.map?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.