theupdateframework / theupdateframework/specification
Canonical JSON may not be valid JSON
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 405
- Forks
- 59
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
All documents use a subset of the JSON object format, with floating-point numbers omitted. When calculating the digest of an object, we use the "canonical JSON" subdialect as described at http://wiki.laptop.org/go/Canonical_JSON
Canonical JSON may be invalid JSON: canonical json says that control characters must not be escaped:
Because only two byte values are escaped, be aware that JSON-encoded data may contain embedded control characters and nulls.
Whereas JSON mandates that control characters are escaped.
I think this deserves a note in the specification, as normal json encoders and decoders cannot be used.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the Canonical JSON reference linked in the issue and the relevant specification text. Confirm how unescaped control characters differ from standard JSON, then add a note explaining the compatibility limitation and why ordinary JSON encoders and decoders may not apply.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100