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

SyntaxError: Expected "," or "]" but "\\" found. #14

Closed
ghost opened this issue Mar 21, 2017 · 0 comments
Closed

SyntaxError: Expected "," or "]" but "\\" found. #14

ghost opened this issue Mar 21, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Mar 21, 2017

{ [SyntaxError: Expected "," or "]" but "\\" found.]
  message: 'Expected "," or "]" but "\\\\" found.',
  expected:
   [ { type: 'literal', value: ',', description: '","' },
     { type: 'literal', value: ']', description: '"]"' } ],
  found: '\\',
  offset: 210,
  line: 1,
  column: 211,
  name: 'SyntaxError' }

Input was

[ '\\uC774\\uB7F0 \\uB958\\uC758 \\uB3C4\\uC11C\\uB97C \\uC88B\\uC544\\uD558\\uC9C0 \\uC54A\\uC74C\\uC5D0\\uB3C4 \\uBD88\\uAD6C\\uD558\\uACE0 \\uC774 \\uCC45\\uC744 \\uC9D1\\uC5B4\\uB4E0 \\uC774\\uC720\\uB294 \\uB2E8\\uC21C\\uD558\\uB2E4. \\',
  '\\uC778\\uD130\\uD30C\\uD06C\\uB3C4\\uC11C',
  'HelloET',
  '20170321',
  'http://book.interpark.com/blog/HelloET/4829812',
  '\\uC790\\uC874\\uAC10 \\uC218\\uC5C5\\uC744 \\uC77D\\uACE0' ]

or(it might be escaped)

[ '\\uC774\\uB7F0 \\uB958\\uC758 \\uB3C4\\uC11C\\uB97C \\uC88B\\uC544\\uD558\\uC9C0 \\uC54A\\uC74C\\uC5D0\\uB3C4 \\uBD88\\uAD6C\\uD558\\uACE0 \\uC774 \\uCC45\\uC744 \\uC9D1\\uC5B4\\uB4E0 \\uC774\\uC720\\uB294 \\uB2E8\\uC21C\\uD558\\uB2E4. \\',
  '\\uC778\\uD130\\uD30C\\uD06C\\uB3C4\\uC11C',
  'HelloET',
  '20170321',
  'http://book.interpark.com/blog/HelloET/4829812',
  '\\uC790\\uC874\\uAC10 \\uC218\\uC5C5\\uC744 \\uC77D\\uACE0' ]

javascript code was...(data was raw data so i should parse this like)

jsonic(`["${data.join('","')}"]`)

Input was just array that includes strings, but there is double backslash.
I guess this is caused by backslash(escaped) element in array.

@ghost ghost closed this as completed Mar 28, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants