You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/12/28 17:27:59 UTC

[GitHub] [airflow] turbaszek edited a comment on issue #13342: XCOM UI: TypeError: Object of type 'DatetimeWithNanoseconds' is not JSON serializable

turbaszek edited a comment on issue #13342:
URL: https://github.com/apache/airflow/issues/13342#issuecomment-751797761


   Well, this is expected, json don't know how to serialise this (or any other non-generic one).
   
   Have you tried this?
   ```py
   DatetimeWithNanoseconds(2020, 6, 22, 17, 1, 30, 12345).rfc3339()
   ```
   This should return the date as string, but parsing it back to object should be easy as there is already `from_rfc3339` method in `proto` package. 
   
   
   Closing as not an Airflow issue.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org