E47A Unable to parse ruby generated yaml with unknown mappings · Issue #8562 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Unable to parse ruby generated yaml with unknown mappings #8562
@fh

Description

@fh

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0