Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Which is the best protocol / format for SOA designs using REST. Here are some options but i can't decide...

  • XML
  • JSON
  • YAML
  • ProtoBuf
  • ... anything else i might have missed

These are my requirements...

  • should be lightweight and less bandwidth guzzler
  • should have existing client libs in Python and PHP
  • should scale VERY WELL

-- UPDATE --

We have two machines (one is Python -- our middletier) and the other is PHP (front end -- used for rendering different HTML for old browsers, HTML 5 browsers and our Adobe AIR client). We need a communications pipe between the Python and PHP machine -- and we think a RESTful service pipe will be a good idea -- we just can't decide on the format.

share|improve this question
Is this just a poll? All the technologies have the desired features. The decision amounts to a coin toss, doesn't it? Heads. – S.Lott Jul 20 '11 at 19:45
up vote 2 down vote accepted

Json seems to be growing in popularity and, as a result, has support in various languages, certainly in PHP and Python. And it is certainly light-weight.

I'm not sure how any choice here should not scale.

share|improve this answer

I personally prefer XML. Its easy to consume and well supported by everything. JSON is lighter and still fairly well supported but to me it being harder to consume isnt worth the saving on traffic. It really depends how much your sending and who is going to consume your api

share|improve this answer
Not sure if I agree withe the XML - might as well use SOAP and then you have the issues with XSD (ie. too heavy). JSON (not Jason) is used just for that is lighter - but I don't agree it is harder to consume. – Catchops Jul 20 '11 at 13:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.