holy s***.
That is creepy, sorry top say it so clear, but it is.
Let me set up a new answer to make the code-highlighting enabled:
You've got a fine HashMap object with Keys and Values.
Now imagine this HashMap to be an Arraylist of Objects with Key/Value pairs - let's call the Object "KeyValue":
import java.io.Serializable;
public class KeyValue implements Serializable{
private static final long serialVersionUID = 1L;
private final String strKey;
private final String strValue;
public KeyValue(String strKey, String strValue){
this.strKey = strKey;
this.strValue = strValue;
}
public String getKey() {
return strKey;
}
public String getValue() {
return strValue;
}
}
Then you'll init a ArrayList and put all HashMap Entries into that ArrayList:
HashMap<string,> oMap = new HashMap<string,>();
ArrayList<keyvalue> oList = new ArrayList<keyvalue>();
for (String strKey : oMap.keySet()) {
oList.add(new KeyValue(strKey, oMap.get(strKey)));
}
</keyvalue></keyvalue>
Now that ArrayList is filled with your Objects. You can send that ArrayList to the client, and as the client knows the Object too, he should be able to retrieve the data.