Why the open quote and bracket for eval('(' + jsonString+ ')') when parsing json string

Viewed 3608

Can you please tell me the reason for this specific syntax structure

 eval('(' + jsonString+ ')')

When parsing json text. Crockford says "The text must be wrapped in parens to avoid tripping on an ambiguity in JavaScript's syntax." here. What does that mean?

Can we avoid it?

3 Answers
Related