For Example:
myJSON = {
param1:val1,
param2:val2
}
vs.
myJSON = {
"param1":val1,
"param2":val2
}
Also are there any browser compatibility issues or possible exceptions that may arise out of using one or the other?
For Example:
myJSON = {
param1:val1,
param2:val2
}
vs.
myJSON = {
"param1":val1,
"param2":val2
}
Also are there any browser compatibility issues or possible exceptions that may arise out of using one or the other?
In JavaScript, names in object literals do not need to be surrounded in quotes, unless they are illegal JavaScript names (e.g. they contain a special character like a dash, they are a reserved word, etc).
In the JSON data exchange format, all names must be surrounded by double quotes.