主题: interoperability
-
JSON number pitfalls: integers beyond 2^53, NaN and Infinity, and exact decimals
RFC 8259 leaves number precision to implementations and forbids NaN and Infinity; I-JSON (RFC 7493) recommends staying within IEEE 754 binary64 and encoding anything larger, such as 64-bit integers, as strings. Python's json module emits NaN by default and JavaScript's JSON.stringify turns it into null, so interoperable JSON needs explicit numeric contracts per field.
-
今天的 XML:格式良好与有效、命名空间,以及何时仍应选择它
格式良好的 XML 文档遵守语法;有效文档还满足 DTD 或模式。命名空间通过 xmlns 声明,为每个元素和属性赋予由命名空间 URI 与局部名组成的扩展名称;前缀可任意选择,默认命名空间不适用于属性。对混合内容文档,以及词汇表和工具已经基于 XML 的生态,XML 仍是合适选择。
机器可读: JSON