Skip to content

Doesn't Work At All For Lists / Arrays? #197

@JimLynchCodes

Description

@JimLynchCodes

yaml code:

name: "something"
posessions:
  - bar
  - Towel
  - Foo

python code:

from strictyaml import load, Map, Str, Int, Seq, YAMLError

with open("my-data.yaml", "r") as stream:
    try:
        data = load(stream)
        print(data)
    except YAMLError as error:
        print(error)

Executing this code incorrectly prints an error about the colon:

  File "data.yaml", line 2
    posessions:
                      ^
SyntaxError: invalid syntax

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