Replies: 2 comments 1 reply
-
Something like that would be more than useful. Even in development process I want to be able to compare export or eval results at each change. I use a pipe through |
Beta Was this translation helpful? Give feedback.
0 replies
-
This would be great. I like to commit materialized json files to git, and non-deterministic order ruins diffs. I work around it with graphql, but would rather not have to. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Canonical JSON creates deterministic ordering on JSON documents, primarily used for consistent hashing, so that equivalent documents are "sorted" resulting in the same signature or hash.
This topic came up in in-toto/in-toto-golang#129, can CUE validate that a JSON document is in canonical form. I wonder if it also applies to Kubernetes ConfigMaps where the contents of the data section are created by CUE. In theory Kubernetes could see a different ConfigMap despite having the "same" contents.
CUE does not have any guarantees on field order, though they tend to be topological in practice. It could be useful to have a canonical output mode for when signing or hashing is required.
Beta Was this translation helpful? Give feedback.
All reactions