Skip to content

Map parsing should automatically convert keys to strings #15

@nilium

Description

@nilium

This'd be a convenience thing for maps, since as-is their keys must be -- syntactically -- strings right now. If non-string keys are encountered, the parser should convert them to strings where possible instead of treating them as an error.

This can't work in any obvious way for keys that are maps or arrays, but all other tokens should be usable (likely by transforming them into a bareword through their raw bytes). This poses a small question of whether a token's raw bytes must necessarily exist, but that seems like an easy 'yes' since it'll be necessary to keep those for tooling.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions