-
Hello. I've been using jsonschema's After some processing, I want to add processed definitions to the resulting schema. So I do it with:
Where Well, all works fine except that each time definitions are sorted randomly. I guess because of the nature of the hash map. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
you can use some of the ordered maps implementations, like https://github.com/wk8/go-ordered-map for example but I would not recommend depending on maps ordering, since it does not have any semantics in JSON and at any point of further processing original order can be lost |
Beta Was this translation helpful? Give feedback.
you can use some of the ordered maps implementations, like https://github.com/wk8/go-ordered-map for example
but I would not recommend depending on maps ordering, since it does not have any semantics in JSON and at any point of further processing original order can be lost