I am creating Azure Data Factory pipeline using Python SDK (azure.mgmt.datafactory.models.PipelineResource
). I need to convert PipelineResource
object to JSON file. Is it possible anyhow?
I tried json.loads(pipeline_object)
, json.dumps(pipeline_object)
but no luck.
2
Answers
you can use this.
You can try the following code snippet as suggested by mccoyp:
You can add a default argument to
json.dumps
to make objects that are not JSON serializable intodict