kubkon / zig-yaml

YAML parser for Zig
MIT License
139 stars 37 forks source link

Unindented lists fail to parse properly #6

Closed MarcoPolo closed 2 years ago

MarcoPolo commented 2 years ago

I noticed this when failing to link a framework .tbd file. The issue boils down yaml of this form not being parsed properly:

b:
- foo: 1
c: 1

This should result in this structure (in json):

{
  "b": [
    {
      "foo": 1
    }
  ],
  "c": 1
}

Instead this library currently parses this as:

{
  "b": [
    {
      "foo": 1,
      "c": 1,
    }
  ]
}

I'll have a PR ready soon.