You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be helpful to have dhall-to-json to maintain the field order of a Json object in dhall record sets(or some other alternative type) instead of having it order alphabetically.
some application might be effected by the fields order of a Json for example.
Or some user will order the field in a specific way in order for them to have the Json more readable (sub objects fields usually are pushed to the end).
this ticket is base on this topic in dhall discourse
The text was updated successfully, but these errors were encountered:
countoren
changed the title
Preserve fields order in dhall-to-json
Preserve fields order in dhall-to-json
Mar 6, 2021
It appears that this is a limitation of using the aeson package for decoding JSON, at least for decoding arbitrary JSON Values. The reason why is that the Value type used to represent schema-free JSON uses a HashMap to represent JSON objects and that representation does not preserve the key order.
So it looks like this might not be fixable without switching to another underlying package for working with JSON values.
It could be helpful to have
dhall-to-json
to maintain the field order of a Json object in dhall record sets(or some other alternative type) instead of having it order alphabetically.some application might be effected by the fields order of a Json for example.
Or some user will order the field in a specific way in order for them to have the Json more readable (sub objects fields usually are pushed to the end).
this ticket is base on this topic in dhall discourse
The text was updated successfully, but these errors were encountered: