rapidyaml
rapidyaml copied to clipboard
[Bug] Keys with ":" raise parsing error with parsing next blocks
Good time of the day there. I believe I'm able to reproduce the bug:
c: "proxy"
a:p_p:
c: "clean"
m: !<SomeClass> [/some/path]
a:d_d:
c: "proxy"
m: !<SomeClass> [/some/path]
-:8:4: (48B): ERROR: ': ' is not a valid token in plain flow (unquoted) scalars
-:8:4: c: "clean" (size=12)
^~~~~~~~~ (cols 4-13)
Indeed, it is some issue with keys with colons since the same yaml with keys without colons is parsed successfully by RYML:
c: "proxy"
p_p:
c: "clean"
m: !<SomeClass> [/some/path]
d_d:
c: "proxy"
m: !<SomeClass> [/some/path]
I also noticed that if you quote the keys, RYML parses successfully too.
c: "proxy"
"a:p_p":
c: "clean"
m: !<SomeClass> [/some/path]
"a:d_d":
c: "proxy"
m: !<SomeClass> [/some/path]
Also, if this helps, the library acts weird and fails in this example only on the second element with a colon-containing key:
a:p_p:
c: "clean"
m: !<SomeClass> [/some/path]
c: "text"
a:d_d:
c: "proxy"
m: !<SomeClass> [/some/path]
In case you don't see comments on this closed issue, let me mention you: @biojppm
Originally posted by @Mr-S-Mirzoev in https://github.com/biojppm/rapidyaml/issues/377#issuecomment-1587943459
Thanks for the detailed description, it is helpful. Please hold for a fix (and expect some weeks for it to appear).
This is likely fixed in the incoming parser refactor, #414.