Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. 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

According to the JSON specification, JSON can be returned in one of five string encodings:

  1. UTF-8 (the default encoding)
  2. UTF-16 Little Endian
  3. UTF-16 Big Endian
  4. UTF-32 Little Endian
  5. UTF-32 Big Endian

Does the API guarantee that only one of these encodings is going to be used? If so, which one?

In other words, is the Content-Type header guaranteed to always be "application/json; charset=utf-8"?

share|improve this question
up vote 3 down vote accepted

Yes, UTF-8 is the guaranteed encoding, at least for versions 1.0 and 1.1.

The others aren't nearly as popular, and waste a lot of space besides.

share|improve this answer
Awesome, thanks. Just making sure. :) – Dave DeLong Feb 20 '11 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .