I have LinkedHashMapwith conditions.
Map<String, String> stateMap = new LinkedHashMap<String, String>();
I create on it JSONObject.
JSONObject json = new JSONObject();
json.putAll(stateMap);
However, the entries look disordered. I would like to keep ordering LinkedHashMapin JSONObject. How can I achieve this?
source
share