This is a hacker way to do this, but one solution is to simply do some string modification of the JSON-ish data to get it in the string before it is parsed.
import re import json not_quite_json = '["foo",,,"bar",[1,,3,4]]' not_json = True while not_json: not_quite_json, not_json = re.subn(r',\s*,', ', null, ', not_quite_json)
What leaves us:
'["foo", null, null, "bar",[1, null, 3,4]]'
Then we can:
json.loads(not_quite_json)
Providing us with:
['foo', None, None, 'bar', [1, None, 3, 4]]
Please note that this is not as simple as replacing, since replacing also inserts commas that may need replacing. Given this, you need to go through until no changes are made. Here I used a simple regular expression to do the job.