Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

returning json from GlassFish

 
Tim Sparg
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic