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:
co-authored by
Claude Opus 5
parent
1ed33b6160
commit
242a1e0ad6
Generated
+1
@@ -112,6 +112,7 @@ version = "1.0.151"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"indexmap",
|
||||||
"itoa",
|
"itoa",
|
||||||
"memchr",
|
"memchr",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
+4
-1
@@ -7,5 +7,8 @@ description = "Generates a portal content repo from a business intake, held to p
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1"
|
anyhow = "1"
|
||||||
serde = { version = "1", features = ["derive"] }
|
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"
|
serde_yaml = "0.9"
|
||||||
|
|||||||
Reference in New Issue
Block a user