Why is this JSON giving me parse errors? I could swear I've done this a hundred times before without issue.
[[0,0,0,new Date(1364068990245)],[0,0,0,new Date(1364068940075)]]
If that's literal JavaScript, as in this:
var myArray = [[0,0,0.......]];
Then it should be fine, your error must be coming from somewhere else.
If it's a string that you're treating as JSON, as in this:
var myArray = JSON.parse("[[0,0,0.........]]");
Then you can't have new Date (or indeed any function call) and it should be just a number that you then parse into a date.
Because the new operator isn't part of JSON. Your example is a valid fragment of a JavaScript file, but it correctly results in an error when parsed as JSON. Dates should be serialized as strings (ideally, as ISO-8601 strings that will be accepted by the Date constructor, but I suppose numbers are tolerable as well).
That's not JSON, there are no dates in the JSON format.
Ref: http://www.json.org/
Some JSON parsers have extended the standard with this way of representing a date:
"[[0,0,0,/Date(1364068990245)/],[0,0,0,/Date(1364068940075)/]]"
If the parser that you use doesn't support that, you have to transmit them as a different data type, for example numbers, and then convert them to dates after parsing the JSON:
"[[0,0,0,1364068990245],[0,0,0,1364068940075]]"
[(function(){alert('Oh noes!');return 0;}())]. Consider what evil things you could do with that...