def clone(root, jsontreecls=jsontree, datetimeencoder=_datetimeencoder,
          datetimedecoder=_datetimedecoder):
    """Clone an object by first searializing out and then loading it back in.
    """
    return json.loads(json.dumps(root, cls=JSONTreeEncoder,
                                 datetimeencoder=datetimeencoder),
                      cls=JSONTreeDecoder, jsontreecls=jsontreecls,
                      datetimedecoder=datetimedecoder)
def clone ( root , jsontreecls = jsontree , datetimeencoder = _datetimeencoder , datetimedecoder = _datetimedecoder ) : return json . loads ( json . dumps ( root , cls = JSONTreeEncoder , datetimeencoder = datetimeencoder ) , cls = JSONTreeDecoder , jsontreecls = jsontreecls , datetimedecoder = datetimedecoder )
Clone an object by first searializing out and then loading it back in.