code: def convert_values(self, pydict):
          
          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
docs: Convert knackhq data type instance to json friendly data.