Appearance
Encoder
Inherits: Class
Methods
Deserialize
lua
function Encoder:Deserialize(str)
-> boolean, ...anyDecodes, decompresses, and deserializes the given data.
Parameters:
| Name | Type | Description |
|---|---|---|
str | string | The data to deserialize |
Returns:
| Name | Type | Description |
|---|---|---|
success | boolean | |
| `` | ...any |
Serialize
lua
function Encoder:Serialize(...)
-> stringSerializes, compresses, and encodes the given data.
Parameters:
| Name | Type | Description |
|---|---|---|
... | any | The data to serialize |
Returns:
| Type | Description |
|---|---|
string |
SetEncodingType
lua
function Encoder:SetEncodingType(encodingType)
-> selfSets the encoding type to use.
Parameters:
| Name | Type | Description |
|---|---|---|
encodingType | EncoderEncodingType |
Returns:
| Type | Description |
|---|---|
self |
SetSerializationFilter
lua
function Encoder:SetSerializationFilter(func)
-> selfSets a serialization filter function.
Parameters:
| Name | Type | Description |
|---|---|---|
func | fun(tbl: table, k: any, v: any): boolean | The filter function |
Returns:
| Type | Description |
|---|---|
self |
SetSerializationType
lua
function Encoder:SetSerializationType(serializationType)
-> selfSets the serialization type to use.
Parameters:
| Name | Type | Description |
|---|---|---|
serializationType | EncoderSerializationType |
Returns:
| Type | Description |
|---|---|
self |
Functions
Create
lua
function Encoder.Create()
-> EncoderCreates an encoder.
Returns:
| Type | Description |
|---|---|
Encoder |