The keys come out in the order they were written

A page is read by the people who own it, and serde_json sorts keys, so
every file put `name` at the bottom under `action` and `consequence`.
With preserve_order the file reads the way it was built: name, then
description, then what the card does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bendik Aagaard Lynghaug
2026-09-24 20:44:37 +02:00
co-authored by Claude Opus 5
parent 1ed33b6160
commit 242a1e0ad6
2 changed files with 5 additions and 1 deletions
Generated
+1
View File
@@ -112,6 +112,7 @@ version = "1.0.151"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
dependencies = [
"indexmap",
"itoa",
"memchr",
"serde",
+4 -1
View File
@@ -7,5 +7,8 @@ description = "Generates a portal content repo from a business intake, held to p
[dependencies]
anyhow = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# preserve_order: a page is read by the people who own it, so the keys
# come out in the order they were written (name, then description, then
# the rest), not sorted with `name` at the bottom.
serde_json = { version = "1", features = ["preserve_order"] }
serde_yaml = "0.9"