I wouldn’t recommend using savePipelineToFile for produtive usage.
If you need to persist objects to a file, create a Java service writing the file. A working example can be found in PSUtilities, but this one does not resemble up to date implementation practises. So I would propose using this as an example and writing a new one. This way you can use all Java functionality for serializing you objects.
Here’s an exemple of a wrapper for the HashMap class. I only tried the IDataCodable interface, but it seems to work perfectly:
The savePipelineToFile/restorePipelineFromFile work as they should
It will save everything that can be saved, meaning: any java Object that is either already recognized (like IData, String, List instances…) or another implementaion of IDataCodable
A bonus I hadn’t expected: in step by step mode, the HashMap is now represented not as its toString() representation, but as the IData you built in the getIData method. Meaning its MUUUUUUUCH more readable in debug mode.
PS: in my implementation, I chose to represent the HashMap as an IData array. Of course, you can do anything you like instead.