code: def _datetime_to_json(value):
      
      if isinstance(value, datetime.datetime):
          value = value.strftime(_RFC3339_MICROS_NO_ZULU)
      return value
docs: Coerce 'value' to an JSON-compatible representation.