def ordered_json(json_dict):
    """Creates a ordered json for comparison"""
    if isinstance(json_dict, dict):
        return sorted((k, ordered_json(v)) for k, v in json_dict.items())
    if isinstance(json_dict, list):
        return sorted(ordered_json(x) for x in json_dict)
    return json_dict