Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON in non-Javascript applications

I'm looking to persist and retrieve a large amount of key-value pair(s) type data over the wire. Is it appropriate for me to use JSON for this purpose against XML?

Is JSON used in non-Javascript applications?

Are there advantages using JSON for this purpose over good old XML?

like image 631
abhilash Avatar asked Oct 26 '09 13:10

abhilash


1 Answers

JSON is fine for this use, and will be more compact than XML. (We're using it extensively in a non-Javascript application, and allow consumers of our REST web services to specify if they want the data in XML, JSON, or even XHTML representations.)

Update: Where bandwidth is a concern, you can probably get a 50-70% compression by GZIP-encoding/decoding your XML or JSON. See GZipStream.

like image 192
Jim Ferrans Avatar answered Nov 14 '22 22:11

Jim Ferrans