الوسائط
any
مطلوب
Value سيتم encode له. nil و booleans و numbers و strings و tables و json.null يتم التعامل معها مباشرة. Unsupported Lua types يتم encode لها كـ 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.