json icon indicating copy to clipboard operation
json copied to clipboard

Document standards conformance

Open sanmai-NL opened this issue 7 years ago • 1 comments

JSON standards have been updated.

Current

It’s not documented to which standard this crate aims to conform.

Expected

It’s documented in the README as well as API docs to which standard this crate aims to conform.

sanmai-NL avatar Dec 17 '17 13:12 sanmai-NL

8259 contains one new sentence: “JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629].”

The difference between these standards is orthogonal to serde_json, right? Serde_json is not in control of how you exchange serialized JSON between systems, and as part of deserializing you do not tell serde_json whether the input came from the same system, from a different system within a closed ecosystem, or a different system not within a closed ecosystem.

If so, I don't think we need to document a specific choice of standard.

But for to_vec and to_writer we can document that they are guaranteed to produce UTF-8 bytes.

dtolnay avatar Apr 13 '24 12:04 dtolnay