• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to convert received JSON data back into a list of objects.  RSS feed

 
Robert James Liguori
Author
Ranch Hand
Posts: 587
6
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my client code:


What I'm calling is this (this is on the server side):


Just FYI (This is what the server-side code is fetching):



==================================================

The above is all good and well...

It's the getting of the data that is failing me.

I try this (from my client code, in hope to start using the data):



And I get this:



Again, the List of objects is turning into JSON, then I receive it... I just need to turn it back into a list of objects, so I can use it.

Thanks.
 
H Paul
Ranch Hand
Posts: 491
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you are using jersey 1.x

Read

http://jersey.java.net/nonav/documentation/latest/user-guide.html

3.5.5. Java instances and types for representations
3.6. Adding support for new representations

and for customization, implement the
http://jsr311.java.net/nonav/javadoc/javax/ws/rs/ext/MessageBodyReader.html

And for more about MessageBodyReader, just Google, you will get it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!