This code:
import json s = \'{ \"key1\": \"value1\", \"key2\": \"value2\", }\' json.loads(s)
produces this error in Python 2:
I suspect it doesn't parse because "it's not json", but you could pre-process strings, using regular expression to replace , } with } and , ] with ]
, }
}
, ]
]