code: def format_json(item, **kwargs):
      
      try:
          json.dumps(item.value)
          return item.value
      except TypeError:
          if 'time' in item.class_type.lower() \
                  or 'date' in item.class_type.lower():
              return item.value.isoformat()
          raise
docs: formats a datatype object to a json value