I have an array in JavaScript that looks like this:
var pattern = [ ["C5", 3], , , , , , , , ["C5", 3], , , ]
I want to store it in a json file like this:
{
"pattern": [
["C5", 3], , , , , , , , ["C5", 3], , ,
]
}
JSONLint tells me this:
Parse error on line 6:
... ], , ,
---------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '['
So I understand I can't let the space between commas empty. What's similar to empty, but is accepted by JSON standards?
This pattern file is part of a Javascript Music Tracker I'm making that's similar to impulse tracker, and I want the json file to be as clean as possible.
If you want to have empty space in JSON, you should fill it with null.
Example:
var pattern = [ ["C5", 3], null, null, null, null, null, null, null, ["C5", 3], null, null, null, null, ...... ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With