This code:
import json
s = \'{ \"key1\": \"value1\", \"key2\": \"value2\", }\'
json.loads(s)
produces this error in Python 2:
That's because an extra ,
is invalid according to JSON standard.
An object is an unordered set of name/value pairs. An object begins with { (left brace) and ends with } (right brace). Each name is followed by : (colon) and the name/value pairs are separated by , (comma).
If you really need this, you could wrap python's json parser with jsoncomment. But I would try to fix JSON in the origin.