Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifiers are over-escaped #17

Closed
dvdsgl opened this issue Aug 25, 2017 · 1 comment
Closed

Identifiers are over-escaped #17

dvdsgl opened this issue Aug 25, 2017 · 1 comment
Assignees
Labels

Comments

@dvdsgl
Copy link

dvdsgl commented Aug 25, 2017

The property x" is represented in the AST as x\":

{ "x\"": 0 }

becomes:

{
  "type": "object",
  "children": [
    {
      "type": "property",
      "key": {
        "type": "identifier",
        "value": "x\\\"",
      },
  ...
}

Try this to verify:

> let sample = JSON.stringify({ 'x"': 0 })
> JSON.parse(sample)
{ 'x"': 0 }
> parse(sample).children[0].key.value
'x\\"'
@dvdsgl dvdsgl changed the title Identifiers are incorrectly escaped Identifiers are over-escaped Aug 25, 2017
@vtrushin
Copy link
Owner

@dvdsgl, is it correct now?

@vtrushin vtrushin added the bug label Nov 2, 2017
@vtrushin vtrushin self-assigned this Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants