Ejemplo n.º 1
0
def save(filename, obj):
    """ Save an object using JSON-pickle.
    """
    with open_filename(filename, "w") as fh:
        return fh.write(encode(obj))
Ejemplo n.º 2
0
def load(filename):
    """ Load a JSON-pickled object.
    """
    with open_filename(filename, "r") as fh:
        return decode(fh.read())