databricks / sjsonnet

Apache License 2.0
267 stars 55 forks source link

sjsonnet allows unquoted field names that start with a number #159

Closed nicklan closed 1 year ago

nicklan commented 1 year ago

You can process this file with sjsonnet:

{
  1_n: "foo",
}

This is against the spec which says that an id (unquoted) fieldname must match: [_a-zA-Z][_a-zA-Z0-9]*

go-jsonnet agrees:

/tmp/n.jsonnet:2:3-4 Unexpected: (NUMBER, "1") while parsing field definition

  1_n: "foo"