aspose file tools
The moose likes Web Services and the fly likes returning json from GlassFish Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "returning json from GlassFish" Watch "returning json from GlassFish" New topic
Author

returning json from GlassFish

Tim Sparg
Ranch Hand

Joined: Dec 29, 2006
Posts: 40
Hi all

I need some help understanding json, and how it is returned.

I've got a simple user object (usercode,userFirstname,userSurname,pwChanged).
Which is represented like so in in json



This I completely understand. However when I get a List of the user objects from Glassfish, I get the following



When I try and pass this through something like Google GSON I get an error until I change the json string to look like the following



Note the removal of the {"user"[]} that surrounded the first list.

Am i misunderstanding something here?


There is no insanity so devastating in man's life as utter sanity
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: returning json from GlassFish
 
Similar Threads
[META/cxf/cxf.xml] cannot be opened because it does not exist
Regular Expression help
Hibernate date in criteria
in JVM what is the need of Just in time compiler and Java Interpreter?
help with apache 2.0.40 + mod_ssl unknown protocol error