def convert_values(self, pydict):
        """Convert knackhq data type instance to json friendly data.
        """
        new_dict = dict()
        for key, value in pydict.items():
            try: # is it's BaseDataType Instance
                new_dict[key] = value._data
            except AttributeError:
                new_dict[key] = value
        return new_dict
def convert_values ( self , pydict ) : new_dict = dict ( ) for key , value in pydict . items ( ) : try : new_dict [ key ] = value . _data except AttributeError : new_dict [ key ] = value return new_dict
Convert knackhq data type instance to json friendly data.