Аргументы
any
обязательно
Value для encode. nil, booleans, numbers, strings, tables и json.null обрабатываются напрямую. Unsupported Lua types кодируются как null, если errorOnUnsupported не true.
EncodeOptions
Optional encode options. boolean переключает pretty output. number включает pretty output с числом spaces, clamp до 0.16. string включает pretty output с этим indent. table может задать pretty, sortKeys, emptyTableAsArray, errorOnUnsupported, encodeInvalidNumbersAsNull, maxDepth и indent.
Возвраты
string
Encoded JSON string. Encoding errors выбрасываются как Luau errors.