def ensure_list(json):
    """
    Ensure that the *json* passed in is a list and not just a simple
    dictionary. If a dictionary is passed in a list of a single item
    will be returned otherwise, *json* is returned unchanged.

    This is required because the generated JSON from the APIs will
    return a dictionary for items such as ``Article`` with only a single
    item present instead of a list with one item. Calling this method
    prevents prevents unneccessary checking and exception handling.
    """
    try:
        json.keys()
        return [json]
    except AttributeError:
        return json
