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'm using this functionality primarily as Terraform's yamldecode() function. For scenarios where humans are not supposed to look at the output this works perfectly fine. However, there are also some use-cases where the decoded (JSON) output would be put as an input to an AWS Step Functions state machine, and that's where humans do need to look at that JSON input, meaning that the tree needs to be logically structured for easy reading.
yamldecode() doesn't seem to contain any options/flags that would control its behavior and by default it seems to sort the nodes alphabetically in the output. E.g. the following YAML input:
Would it be possible to either output the original order of nodes as a default behavior or, if it hurts performance too much, make it an optional behavior by setting some flag?
Thanks
The text was updated successfully, but these errors were encountered:
Hi,
I'm using this functionality primarily as Terraform's
yamldecode()
function. For scenarios where humans are not supposed to look at the output this works perfectly fine. However, there are also some use-cases where the decoded (JSON) output would be put as an input to an AWS Step Functions state machine, and that's where humans do need to look at that JSON input, meaning that the tree needs to be logically structured for easy reading.yamldecode()
doesn't seem to contain any options/flags that would control its behavior and by default it seems to sort the nodes alphabetically in the output. E.g. the following YAML input:Is decoded as the following JSON:
By comparison,
pyyaml
produces the required output:Would it be possible to either output the original order of nodes as a default behavior or, if it hurts performance too much, make it an optional behavior by setting some flag?
Thanks
The text was updated successfully, but these errors were encountered: