import json


def copyJSONable(obj):
    """
    Creates a copy of obj and ensures it is JSONable.

    :return: copy of obj.
    :raises:
        TypeError: if the obj is not JSONable.
    """
    return json.loads(json.dumps(obj))