I am generating a Yaml config file with rubys YAML::dump, and want to read the generated file with Symfonys Yaml-Component. However, YAML::dump adds some unwanted "object mapping" to some hashes, which causes the Symfony Parser to fail:
---
something: !map:Mash
foo: bar
The !map:Mash causes the parsing to fail. Technically, this is probably no bug, this the designated object type Yaml is supposed to map the data to is unknown - but maybe it is a good idea to either mention this issue in the documentation, or provide some possibility to ignore/override it.
Right now, my workaround is a pretty ugly one, I am removing it on the ruby side in the resulting yaml string: https://github.com/till/easybib-cookbooks/blob/bibcd/bibcd/providers/app.rb#L12 - and I would love to do it somewhat cleaner and error prone.
Any thoughts here?
I am generating a Yaml config file with rubys YAML::dump, and want to read the generated file with Symfonys Yaml-Component. However, YAML::dump adds some unwanted "object mapping" to some hashes, which causes the Symfony Parser to fail:
The
!map:Mashcauses the parsing to fail. Technically, this is probably no bug, this the designated object type Yaml is supposed to map the data to is unknown - but maybe it is a good idea to either mention this issue in the documentation, or provide some possibility to ignore/override it.Right now, my workaround is a pretty ugly one, I am removing it on the ruby side in the resulting yaml string: https://github.com/till/easybib-cookbooks/blob/bibcd/bibcd/providers/app.rb#L12 - and I would love to do it somewhat cleaner and error prone.
Any thoughts here?