Why do json attribute names use double quotation marks (I guess) and json double quotation marks?
Cause 1:
More standardized for analysis
Cause 2:
Avoid incompatibility problems caused by keywords such as class
Cause 3:
It may also be the most obscure:
Var a = 00; var B = {00: 12}; a in B; --> truevar a = 0; var B = {'00': 12}; a in B; --> false
I guess that if the property name of a js object is not of the string type, type conversion is performed first, but unexpected values may appear in this process. Although this is only an example, but it is necessary to develop a good habit.
Json Object Attributes must be enclosed in double quotation marks
Not mandatory. As long as the attribute name complies with the naming rules of the variable, double quotation marks can be added.
What should I do if the json value contains double quotation marks?
Replace "\" ""