As mentioned in this StackOverflow question, you are not allowed to have any trailing commas in json. For example, this
{
\"key1\": \"value1\",
\"key
You can wrap python's json parser with jsoncomment
JSON Comment allows to parse JSON files or strings with:
- Single and Multi line comments
- Multi line data strings
- Trailing commas in objects and arrays, after the last item
Example usage:
import json
from jsoncomment import JsonComment
with open(filename) as data_file:
parser = JsonComment(json)
data = parser.load(data_file)