Aptana shows syntax errors with JSON data declaration?
I am using Aptana 3, and it is giving a little red cross saying there is a syntax error when I have this in a .html file.
<script>
var data = [
{'name':'Name1', 'email':'a@email.com'}]
</script>
I don't have problem running the script, and Dreamweaver doesn't throw an error.
What's wrong?
UPDATE: If I save it as a .js and remove the tag, the warning goes away. But what not in html开发者_Go百科
精彩评论