uranusjr commented on a change in pull request #16786:
URL: https://github.com/apache/airflow/pull/16786#discussion_r663500550
##########
File path: airflow/models/xcom.py
##########
@@ -223,7 +223,9 @@ def serialize_value(value: Any):
if conf.getboolean('core', 'enable_xcom_pickling'):
return pickle.dumps(value)
try:
- return json.dumps(value).encode('UTF-8')
+ from airflow.serialization.serialized_objects import
BaseSerialization
+
+ return json.dumps(BaseSerialization._serialize(value,
fail_on_error=True)).encode('UTF-8')
Review comment:
Maybe we should add a `BaseSerialization.to_json()` method for symmetry
--
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]