-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maping fields order is not preserved #64
Comments
Is this a feature request? |
Depend how to treat it. According to https://yaml.org/spec/1.2.2/#3221-mapping-key-order mapping key order is not important, but from the point of readability is. |
I agree that preserving the field order is desirable. I'd be happy to accept a PR that implements this. I think we need to be a bit careful not to introduce a performance regression with this though: HsYAML/src/Data/YAML/Internal.hs Lines 40 to 41 in be60400
A simple list of pairs might be too slow during lookups: type Mapping loc = [(Node loc, Node loc)] So a type similar to |
Encoding the following mapping
results in:
The text was updated successfully, but these errors were encountered: