Closed
Description
When a method returns e.g. an ArrayList, the resulting JSON output is empty. This can be fixed by a small addition to JsonProvider.writeTo that looks more or less like this (I have fixed it in a subclass of JsonProvider to avoid recompiling the JAX-RS extension):
[...]
} else if (object instanceof JSONArray) {
writer.write(((JSONArray) object).toString());
// begin
} else if (object instanceof Collection) {
JSONArray jsonArray = new JSONArray((Collection) object);
writer.write(jsonArray.toString());
// end
} else if (object instanceof CharSequence) {
[...]