def _deserialize_datetime ( self , data ) : for key in data : if isinstance ( data [ key ] , dict ) : if data [ key ] . get ( 'type' ) == 'datetime' : data [ key ] = datetime . datetime . fromtimestamp ( data [ key ] [ 'value' ] ) return data
python json deserialize datetime
Take any values coming in as a datetime and deserialize them
def _deserialize_datetime(self, data):
        """Take any values coming in as a datetime and deserialize them

        """
        for key in data:
            if isinstance(data[key], dict):
                if data[key].get('type') == 'datetime':
                    data[key] = \
                        datetime.datetime.fromtimestamp(data[key]['value'])
        return data