File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSON vs XML

 
Anu Bhagat
Ranch Hand
Posts: 64
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to make a decision for data transfer appraoch in a java application.
I am not sure if I should use JSON or XML.
Any comments will be useful.

Thanks in advance.

Anu Bhagat
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"In" a Java application? What are the two ends of the transfer?
 
Vishal Shaw
Ranch Hand
Posts: 179
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think this might help you

Vishal
 
kourosh parsa
Ranch Hand
Posts: 35
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xml has a definition file which can be used to validate that your tags are correct.
Both the formats are well supported for parsing so I guess you can go with which ever, although in the industry, xml is often favored.
 
Marcos Vidolin
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The approach will depend on what you want. In general I have used JSON because it's smaller and more readable than XML.
Just for note, Twitter and Foursquare left XML and started using exclusively JSON.

The following code snippets represents the same data:


JSON


XML
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic