bolkedebruin commented on code in PR #27540:
URL: https://github.com/apache/airflow/pull/27540#discussion_r1020350738
##########
tests/utils/test_json.py:
##########
@@ -25,9 +25,26 @@
import pendulum
import pytest
+from airflow.datasets import Dataset
from airflow.utils import json as utils_json
+class Z:
+ def __init__(self, x):
+ self.x = x
+
+ def serialize(self) -> dict:
+ return dict({"x": self.x})
+
+ @staticmethod
+ def deserialize(data: dict):
+ return Z(data["x"])
Review Comment:
My idea is that serialization isn't something special and not necessarily
tied to Airflow. In essence it is just a to_dict()/from_dict() which goes for
anything in python.
--
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]