I am facing an issue with converting a specific string to JSON format. Here is the string:
'{clientId: "1239268108.1505087088", userId: "0.4744496956388684", "url": "http://boomfix.es/", "pageUrl": "1", "timer": "15", "clickCount": "4", "mouseMax": "", "objective": ""}'
I'm curious as to why the JSON.parse
method doesn't work on this string. Is it necessary for every element in JSON to be enclosed in quotes for parsing? How does this syntax differ from a standard JavaScript object?