Hi,
formerly I used ReferenceStream, SmartReferenceStream. Format is binary and not necessary compatible over image versions.
readTrainingsSamples "read the class var TrainingsSamples from a file using ReferenceStreams " | rr | rr := ReferenceStream fileNamed: 'trainingssamples.obj'. TrainingsSamplesFehlerkategorien trainingsSamples: rr next. rr close. rr := nil
writeTrainingsSamples "write the class var TrainingsSamples to a file using ReferenceStreams"
| rr | rr := ReferenceStream fileNamed: 'trainingssamples.obj'. rr nextPut: TrainingsSamplesFehlerkategorien trainingsSamples . rr close. rr := nil
Nowadays I use JSON for this.
Cheers,
Herbert
Am 11.01.2017 um 20:14 schrieb Louis LaBrunda:
Hi Tobias,
What is the squeak equivalent of VA Smalltalk's ObjectLoader and ObjectDumper?
What do they do?
ObjectDumper serializes objects and ObjectLoader deserializes the resultant string. They work with in memory stream or disk files. I think things like Fuel, Ma Serializer and SIXX would be based on classes like ObjectLoader and ObjectDumper. But I'm not sure.
I only need a very lite version so I don't think I need those full packages (again I'm not sure).
Lou