Skip to content

[Bug] Keys with ":" raise parsing error with parsing next blocks #379

@Mr-S-Mirzoev

Description

@Mr-S-Mirzoev

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]
image
-: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]
image

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]
image

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]
image

In case you don't see comments on this closed issue, let me mention you: @biojppm

Originally posted by @Mr-S-Mirzoev in #377 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions