• Post Reply Bookmark Topic Watch Topic
  • New Topic

What kind of data representation usually used in Restful?

 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends..

I am wondering about what kind of data representation usually used in Restful WebService?..
and which one is good for implementation in our application?.. JSON data format or XML data format?..

Thanks in advance..
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The great advantage of RESTful architecture is that it does not require any particular data representation. A RESTful client can request a particular kind of representation and the service should be able to create it.

For example, using the Jersey framework you can define methods in your service class that return XML, JSON, plain text, html or an image.

All of this is made possible by the general nature of HTTP headers.

Bill
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Java Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi William Brogden..

Thanks for your reply, it helps me to know the data representations of RESTful..
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!