Skip to content

Serde

Serde . encode ( format ,  value ,  pretty )  -> string

Encodes the given value using the given format.

Parameters

format: EncodeDecodeFormat
value: any
pretty: boolean?

Returns

string
Serde . decode ( format ,  encoded )  -> any

Decodes the given string using the given format into a lua value.

Parameters

format: EncodeDecodeFormat
encoded: buffer | string

Returns

any
Serde . decompress ( format ,  s )  -> string

Decompresses the given string using the given format.

Parameters

format: CompressDecompressFormat
s: buffer | string

Returns

string
Serde . compress ( format ,  s ,  level )  -> string

Compresses the given string using the given format.

Parameters

format: CompressDecompressFormat
s: buffer | string
level: number?

Returns

string