When I tried to send to my express server JSON like this one:
"{ name: '...', description: '...' }"
This error had been throwed:
SyntaxError: Unexpected token n ...
Trying to parse JSON like this in Chrome:
"{ 'name': '...', 'description': '...' }"
Leads to this error:
SyntaxError: Unexpected token ' ...
Why parsing those JSONs leads to an error? Especially the second JSON looks valid (using '
instead of "
).