Documentation
¶
Overview ¶
Package pyjson encodes JSON exactly as Python's json.dumps does with its defaults.
This matters wherever JSON is STORED rather than merely transmitted — the CRDT documents on disk and the frontmatter_json index column — because the Go and Python implementations have to produce identical bytes there. Two differences would otherwise creep in silently:
- separators: Python defaults to ", " and ": "; Go's encoding/json emits "," and ":". A LIKE '%"pinned": true%' query written against one shape matches nothing against the other.
- ensure_ascii: Python escapes every non-ASCII rune as \uXXXX (with surrogate pairs above the BMP); Go emits raw UTF-8. Any note with an emoji in its title stores different bytes.
Go additionally HTML-escapes <, > and & by default, which Python does not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.