Skip to main content
Clones a value by encoding it with json.encode semantics and decoding the generated JSON back into Lua values.

Syntax

Arguments

Returns

Types

EncodeOptions

Controls JSON serialization and formatting.

Example

Round-trip a JSON-compatible value through json.encode and json.decode before changing nested values.