- Serialize the transforms into a human-readable format. We can transform to JSON using TransformProcess as follows:
String serializedTransformString = transformProcess.toJson()
We can transform to YAML using TransformProcess as follows:
String serializedTransformString = transformProcess.toYaml()
You can find an example of this at https://github.com/PacktPublishing/Java-Deep-Learning-Cookbook/blob/master/02_Data_Extraction_Transform_and_Loading/sourceCode/cookbook-app/src/main/java/com/javadeeplearningcookbook/app/SerializationExample.java.
- Deserialize the transforms for JSON to TransformProcess as follows:
TransformProcess tp = TransformProcess.fromJson(serializedTransformString)
You can do the same for YAML to TransformProcess as follows:
TransformProcess tp = TransformProcess.fromYaml(serializedTransformString)