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
I would like to order mapping keys in the dump for human readability.
For my use case a flat list is enough.
How about something like this?
yaml.dump(data, { mapping_key_order = { "key1", "key2", ... } }) -- keys not in the list are dumped in the end
and, for finer control:
yaml.dump(data, { mapping_key_order = function(mapping) -- This may be the default if mapping_key_order = true
local keys = tkeys(mapping)
table.sort(keys)
return keys
end }) -- keys not in the list are dumped in the end
If mapping_key_order is not specified, use the current implementation for performance.
The text was updated successfully, but these errors were encountered:
I would like to order mapping keys in the dump for human readability.
For my use case a flat list is enough.
How about something like this?
and, for finer control:
If
mapping_key_order
is not specified, use the current implementation for performance.The text was updated successfully, but these errors were encountered: