nanos world API Reference Unofficial documentation
Static function Shared

JSON.stringify

Returns a string representing value encoded in JSON

Syntax

Lua
JSON.stringify(value)

Parameters

Name Type Default Description
value table the table that will become JSON

Returns

  • string the table in JSON

Examples

Stringifies a Lua table
local encoded_value = JSON.stringify({ 1, 2, 3, { x = 10, y = Vector(1, 2, 3) }, "he" })