Skip to content

Property names starting with digits #147

@icraggs

Description

@icraggs

Using the JSONata exerciser at http://try.jsonata.org - not sure which version that is.

data {"7a":33, "a7":55, "7":88}:

7a -> Syntax error: “a”
“7a” -> “7a”
7a -> 33

$.7a -> Syntax error: “a”
$.“7a” -> 33
$.7a -> 33

but:

$.7 -> 88

It seems inconsistent to allow $.7 but not $.7a unquoted (or unticked). Identifiers which start with a digit should be treated the same way regardless of whether they consist entirely of digits or only partly, in my opinion. I prefer that they should need to be enclosed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions