Skip to content

Syntax error when emitting to JSON from a YAML zero leading number value #291

@captain-yoshi

Description

@captain-yoshi

Emitting a JSON file from a YAML with a leading zero value will give a SyntaxError when parsed in JSON.

YAML

error: 04

JSON

{"error": 04}

Not sure if the responsibility is on the user or the library. Not sure if it's easy but when emitting to JSON you could convert to a string if there is a leading zero number, as it is invalid in JSON.

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