JSON: Difference between revisions
Content added Content deleted
(Undo revision 170305 by Common-dude (talk)) |
(add julia entry) |
||
Line 1,077: | Line 1,077: | ||
However, there is an ambiguity with parsing JavaScript object literals by themselves, where it might be mistakenly interpreted as a block, and the key followed by a colon as a label. To avoid this, remember to surround it in parentheses to force it to be interpreted as an expression: |
However, there is an ambiguity with parsing JavaScript object literals by themselves, where it might be mistakenly interpreted as a block, and the key followed by a colon as a label. To avoid this, remember to surround it in parentheses to force it to be interpreted as an expression: |
||
<lang javascript>var data = eval('(' + '{ "foo": 1, "bar": [10, "apples"] }' + ')');</lang> |
<lang javascript>var data = eval('(' + '{ "foo": 1, "bar": [10, "apples"] }' + ')');</lang> |
||
=={{header|Julia}}== |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |