My Java code returns a Collection (ArrayList) and the resulting JSON produced by JAXB looks like:
{"todo":[{"name":"CAMPBELL","sales":"3","time":"1331662363931"},
{"name":"FRESNO","sales":"2","time":"1331662363931"}]}
But, is there a way I can make it look like:
[{"name":"CAMPBELL","sales":"3","time":"1331662363931"},
{"name":"FRESNO","sales":"2","time":"1331662363931"}]
Is there a way in Java/JAXB or maybe in AJAX callback using responseText. .
BTW, I've also tried with Java array but it made no difference.
Any help will be appreciated.