I think (actually I KNOW!) I\'m doing something wrong here I am trying to populate some values into HashMap and add each hasmap to a list which will be added to a JSON objec
Got it working! I should have been building a JSONArray of JSONObjects and then add the array to a final "Addresses" JSONObject. Observe the following:
JSONObject json = new JSONObject();
JSONArray addresses = new JSONArray();
JSONObject address;
try
{
int count = 15;
for (int i=0 ; i
This worked and returned valid and parse-able JSON. Hopefully this helps someone else in the future. Thanks for your help Marcel