Object Serialization In Julia

Is there a package for serialization/deserialization of types in Julia?

Thanks

1 Like

https://github.com/simonster/JLD2.jl

3 Likes

I thought there were some limitations when serializing functions with JLD/JLD2?
FWIW: serialize() / deserialize() worked for me just fine w/o limitations.

Julia’s built-in serialize/deserialize make no promises AFAIK about backwards compatibility.
It’s fine is you just need to save and restore data between sessions, or for sending data to parallel workers, but not if you wish to store the data in some form of database.

2 Likes

serialize / deserialize is not a stable format and it is possible that you cannot read a serialized object created with another Julia version. It really is only intended for process to process communication.

4 Likes

True. But the OP query was not about DB storage, but rather about serialization.

1 Like

@Qiyamah perhaps you can clarify, did you mean serialization to send objects online between Julia processes, or serialization to store Julia types into files or other persistent storage?

I want to compare 2 objects after serialization.
That’s what i want to use it for.

I want to serialize a recursive function A , and check an instance of the function call is equal to another function call.
Thanks