2

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"?

1 Answer 1

3

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.

0

You must log in to answer this question.

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