Hot debate today:
文本流null
是有效的JSON吗?
根据http://www.ietf.org/rfc/rfc4627.txt?number=4627:
...
2. JSON GrammarA JSON text is a sequence of tokens. The set of tokens includes six structural characters, strings, numbers, and three literal names.
JSON文本是一个序列化的对象或array.
这是否应该解释为两个语句都必须为真,才能使文本成为有效的JSON?
- http://code.google.com/p/json-framework/issues/detail?id=49似乎表明(在底部)这是无效的.
- http://json.parser.online.fr/也将其标记为无效.
然而,许多其他库似乎允许它,并且实际上,似乎单个有效令牌could是合法结果.
有没有一个明确的答案?