Skip to main content
Serializes a Lua value to a JSON string like json.encode.

Syntax

Arguments

Returns

Types

EncodeOptions

Controls JSON serialization and formatting.

Example

Encode JSON-compatible values using the same behavior as json.encode.