import json


def decode_faulty_json(text):
    """
    Attempt to decode json containing newlines inside strings,
    which is invalid for the JSON standard.
    """
    text = text.replace('\n', ' ').replace('\r', '')
    return json.loads(text)