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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.