Skip to content

Instantly share code, notes, and snippets.

@fasterthanlime
Created November 18, 2014 10:39
Show Gist options
  • Save fasterthanlime/2a6be115b45995407ecc to your computer and use it in GitHub Desktop.
Save fasterthanlime/2a6be115b45995407ecc to your computer and use it in GitHub Desktop.
Mozilla Parser API is a lot more verbose than XML
{
"type": "Program",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "a"
},
"init": {
"type": "ObjectExpression",
"properties": [
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "ruby"
},
"value": {
"type": "Literal",
"value": "Ruby",
"raw": "\"Ruby\""
},
"kind": "init"
},
{
"type": "Property",
"key": {
"type": "Identifier",
"name": "cpp"
},
"value": {
"type": "Literal",
"value": "C++",
"raw": "\"C++\""
},
"kind": "init"
}
]
}
}
],
"kind": "var"
}
]
}
var a = {
ruby: 'Ruby',
cpp: 'C++'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment