java
java copied to clipboard
Error, Maps cant have keys that aren't strings.
When trying to convert to JSON a map with a key different than String it will give an error. The example below doesn't work.
Map<Integer,String> map = new HashMap<Integer, String>();
map.put(3, "hello world");
String aux = JsonStream.serialize(map);