For the complete documentation index, see llms.txt. This page is also available as Markdown.

ObjectSerialize

Serialize an object to file or convert it to binary format using Java Serialization

Method Signature

ObjectSerialize(object=[any], file=[string])

Arguments

Argument
Type
Required
Description
Default

object

any

true

The object to serialize

file

string

false

The file path to save the serialized object to, if not provided, the binary representation of the object is returned

Examples

Serialize a BoxLang object to binary

data = { name: "test", values: [ 1, 2, 3 ] };
serialized = objectSerialize( data );
writeOutput( isBinary( serialized ) );

Result: true

Last updated

Was this helpful?