environment/lib/python2.7/site-packages/IPython/utils/jsonutil.py
def squash_dates(obj):
    """squash datetime objects into ISO8601 strings"""
    if isinstance(obj, dict):
        obj = dict(obj) # don't clobber
        for k,v in obj.iteritems():
            obj[k] = squash_dates(v)
    elif isinstance(obj, (list, tuple)):
        obj = [ squash_dates(o) for o in obj ]
    elif isinstance(obj, datetime):
        obj = obj.strftime(ISO8601)
    return obj
def squash_dates(obj):
    if isinstance(obj, dict):
        obj = dict(obj) # don't clobber
        for k,v in obj.iteritems():
            obj[k] = squash_dates(v)
    elif isinstance(obj, (list, tuple)):
        obj = [ squash_dates(o) for o in obj ]
    elif isinstance(obj, datetime):
        obj = obj.strftime(ISO8601)
    return obj
def squash_dates ( obj ) : if isinstance ( obj , dict ) : obj = dict ( obj ) # don't clobber for k , v in obj . iteritems ( ) : obj [ k ] = squash_dates ( v ) elif isinstance ( obj , ( list , tuple ) ) : obj = [ squash_dates ( o ) for o in obj ] elif isinstance ( obj , datetime ) : obj = obj . strftime ( ISO8601 ) return obj
squash datetime objects into ISO8601 strings
squash datetime objects into ISO8601 strings