I’ve found the serialized and justSerialized methods on Object and already successfully serialized objects to files, but I cannot find a matching deserialize method.
Is there none or am I just too stupid to find it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think
doStringordoMessageshould do what you need (though I can’t confirm this at moment because I don’t have Io running on this machine).For eg:
or
Update – Can now confirm that
doStringordoMessagedoes work. Full example below:Foo.io
serialize.io
restore_object.io
In fact you can also deserialize the object with
doRelativeFileordoFile:Because serialized data is just Io code.
/I3az/