I have a non-typed collection of Entities and want to convert to JSON String, using JSONSimple.
I've tried with JSONObject like:
Collection entities; //supose its a non-typed Collection returned from service.
JSONObject colJSON = new JSONObject();
colJSON.put("entities",entities);
JSONValue.toJSONString(colJSON);
But, it just returns the Collection toString() method instead of the elements of the Collection;