objectSave

Serialize object to file or convert it to binary format

objectSave(object [, file]) → returns binary

Argument Reference

object variableName
Required

Object to be serialized

file string

File in which serialized object will be stored

Compatibility

RustCFML:

Own binary format (RCFMLOBJ), not Java serialization. Components/closures serialize to null.

Links more information about objectSave

Examples
Sample code invoking the objectSave function

people = queryNew('id,name','integer,varchar', {'id':1,'name':'Pedro'});
binary_people = objectSave(people);
writeDump(binary_people);
restored_people = objectLoad(binary_people);
writeDump(restored_people);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub