Sign up ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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

1 Answer 1

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 .