Sorted keys

This commit is contained in:
Joe 2025-12-09 00:28:13 -06:00
parent d08780fc14
commit 929bc254fa
16 changed files with 145 additions and 36 deletions

View file

@ -160,7 +160,7 @@ pub fn syncback_lua<'sync>(
let parent_location = snapshot.path.parent_err()?;
fs_snapshot.add_file(
parent_location.join(format!("{}.meta.json", new_inst.name)),
serde_json::to_vec_pretty(&meta).context("cannot serialize metadata")?,
crate::json::to_vec_pretty_sorted(&meta).context("cannot serialize metadata")?,
);
}
}
@ -203,7 +203,7 @@ pub fn syncback_lua_init<'sync>(
if !meta.is_empty() {
dir_syncback.fs_snapshot.add_file(
snapshot.path.join("init.meta.json"),
serde_json::to_vec_pretty(&meta)
crate::json::to_vec_pretty_sorted(&meta)
.context("could not serialize new init.meta.json")?,
);
}