Sunday, March 21, 2021

Do the JSON keys have to be surrounded by Double quotes?

https://stackoverflow.com/a/949469/2413870

https://medium.com/@alifabdullah/never-confuse-json-and-javascript-object-ever-again-7c32f4c071ad


 Yes, JSON Keys are to be surrounded by Double Quotes
 JavaScript objects do not contain single or double quote marks around the keys when no spacing is used in the key name.
var person= {first name: “Depp”, address: “earth”}; //invalid// To prevent this error:
var person= {“first name”: “Depp”, "address": “earth”};

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass