I currently use cfn-flip to convert Cloudformation templates from YAML to JSON and migrating to rain after cfn-flip's deprecation notice. After some testing with rain I noticed that fmt does not work when anchors are present and trying to convert to JSON. This error will be thrown when running rain fmt <filename> -j: yaml: unknown anchor 'testAnchor' referenced
After looking at issue #265, I see that it's possible to run rain pkg then rain fmt to achieve the desired result after adding in the --unsorted flag, but it would be nice to convert a YAML file JSON after resolving anchors without having to run rain pkg first.
I currently use cfn-flip to convert Cloudformation templates from YAML to JSON and migrating to rain after cfn-flip's deprecation notice. After some testing with rain I noticed that
fmt
does not work when anchors are present and trying to convert to JSON. This error will be thrown when runningrain fmt <filename> -j
:yaml: unknown anchor 'testAnchor' referenced
After looking at issue #265, I see that it's possible to run
rain pkg
thenrain fmt
to achieve the desired result after adding in the--unsorted
flag, but it would be nice to convert a YAML file JSON after resolving anchors without having to runrain pkg
first.