Is null valid JSON (4 bytes, nothing else)

前端 未结 2 986
别那么骄傲
别那么骄傲 2020-12-03 06:30

Hot debate today:

Is the text stream null valid JSON?

According to http://www.ietf.org/rfc/rfc4627.txt?number=4627:

...

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 07:09

    [Note! This answer is no longer correct, see answer by @niksnut.]

    Yes, both statements must be true. The literal token null is a JSON value. A JSON text is a serialized object or array, which requires {} or [].

提交回复
热议问题