dstandish commented on PR #27609:
URL: https://github.com/apache/airflow/pull/27609#issuecomment-1315916558

   > Why don't we use `AirflowJsonEncoder` for `to_json` method like this PR: 
#11952 ? It's more cleaner
   
   Seemed like a good idea so I explored it just now.  The problem is that 
AirflowJsonEncoder is only one way -- there's no AirflowJsonDecoder that will 
get you back the same object.  For example, when encoding a pod, it doesn't 
store anywhere the information that the json came from a v1pod so when decoding 
the json you would just get back dict of plain json-compatible objects.   So, 
we cannot use this approach. 
   
   HOWEVER... with some adjustments, we can use BaseSerialization.  Not sure if 
this is any better but, i've taken a crack at it.  
   
   @uranusjr what do you think is better?  Currently PR is converting to use 
BaseSerialization.  The original approach remains visible at 
https://github.com/apache/airflow/compare/main..15987961421ea5aa3c05b429c068cec85c55b774


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to