dtolnay / serde-yaml

Strongly typed YAML library for Rust
Apache License 2.0
960 stars 157 forks source link

Yaml with colon at the beginning of a value won't parse #404

Open joe2xyz opened 9 months ago

joe2xyz commented 9 months ago

Dear Serde maintainers,

Thank you for the library. It's fantastic.

When I use serde_yaml::from_str, the following YAML won't work:

- a:
    b:
      c:
        - f: [:this_WILL_fail]
        - f: [':this_will_NOT_fail']
      e:
        - { g: :this_WILL_fail }
        - { g: ':this_will_NOT_fail' }

But It should. You can for example try to convert it by cat file.yml | remarshal -if yaml -of json and remarshal will convert it.

Thank you.

Joe

(first I posted this in serde-rs https://github.com/serde-rs/serde/issues/2667 but I was asked to post it here)