code: def _default_json_default(obj):
      
      if isinstance(obj, (datetime.datetime, datetime.date, datetime.time)):
          return obj.isoformat()
      else:
          return str(obj)
docs: Coerce everything to strings.
      All objects representing time get output as ISO8601.