upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorubiquitarianism <283527159+ubiquitarianism@users.noreply.github.com>2026-11-23 20:40:26 -0500
committerGitHub <noreply@github.com>2026-11-23 20:40:26 -0500
commit321f66fac8f2833d65eba31bf4dd5980fcb18310 (patch)
tree19f91472d7bacfcaa8e7d38a18721a733a4773ce /docs
parent760012c72555aa4da009bdb10001628de30ddd77 (diff)
parent20c7188efd82724eb32dd3baf383b0752c48a1a9 (diff)
Merge pull request #8 from wavehs/saves-json-nesting-limit
saves: reject JSON nested deeper than 512 levels explicitly
Diffstat (limited to 'docs')
-rw-r--r--docs/saves.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/saves.md b/docs/saves.md
index f590f523c..e710029a1 100644
--- a/docs/saves.md
+++ b/docs/saves.md
@@ -41,6 +41,11 @@ body UTF-8 JSON, CRLF between blocks:
41Both samples have 38 code and 44 script blocks. `tools/saves.py verify` rebuilds them byte for byte from the parsed 41Both samples have 38 code and 44 script blocks. `tools/saves.py verify` rebuilds them byte for byte from the parsed
42blocks, which confirms the framing, padding and offsets. The JSAV carries no checksum of its own. 42blocks, which confirms the framing, padding and offsets. The JSAV carries no checksum of its own.
43 43
44A body or a block nested deeper than 512 JSON levels is rejected as malformed (`JSON_NESTING_LIMIT` in
45`tools/saves.py`, one error line and exit 2). The limit is the tool's, not the interpreter's: Python 3.14's JSON
46decoder is iterative and no longer raises `RecursionError` on a deeply nested document, while real saves nest a few
47levels.
48
44Block conventions: 49Block conventions:
45- Each block is `{"$0x<group>":{"$0x<hash>":{...}}}`, with one group hash for code blocks and one for script blocks. The inner hash equals the index entry's hash. **confirmed** 50- Each block is `{"$0x<group>":{"$0x<hash>":{...}}}`, with one group hash for code blocks and one for script blocks. The inner hash equals the index entry's hash. **confirmed**
46- Keys are 32-bit hashes written as `"$0x%08x"`: the **case-sensitive** joaat (seed 0, no lower-casing) of the engine or script name, the same rule as the member hashes in [world_names.md](world_names.md). **confirmed**, see [Key names](#key-names). 51- Keys are 32-bit hashes written as `"$0x%08x"`: the **case-sensitive** joaat (seed 0, no lower-casing) of the engine or script name, the same rule as the member hashes in [world_names.md](world_names.md). **confirmed**, see [Key names](#key-names).