Skip to main content

JSON

JSON.Stringify(data: table): string

Converts a lua table into a JSON string.

local json_str = JSON.Stringify({key = "value", number = 123})

JSON.Parse(data: string): table

Converts a JSON string into a lua table.

local table = JSON.Parse('{"key": "value", "number": 123}')