def parser(chunks):

    dictionaries = []
    for chunk in chunks:
        try:
            dictionaries.append(json.loads(chunk))
        except ValueError:
            dictionaries.append({
                'unparsed': chunk
            })

    return dictionaries
Parse a data chunk into a dictionary; catch failures and return suitable
dataset/ETHPy150Open jomido/jogger/jogger/jogger.py/parser