Skip to main content

Argümanlar

any
gerekli
Encode edilecek Value. nil, booleans, numbers, strings, tables ve json.null dogrudan islenir. Unsupported Lua types, errorOnUnsupported true degilse null olarak encode edilir.
EncodeOptions
Optional encode options. boolean pretty output degerini toggle eder. number, 0.16 araligina clamp edilen spaces sayisiyla pretty output etkinlestirir. string bu indent ile pretty output etkinlestirir. table pretty, sortKeys, emptyTableAsArray, errorOnUnsupported, encodeInvalidNumbersAsNull, maxDepth ve indent ayarlayabilir.

Dönüşler

string
Encoded JSON string. Encoding errors Luau errors olarak throw edilir.

Tipler

EncodeOptions

JSON serileştirmesini ve biçimlendirmesini kontrol eder.

Örnek

JSON-compatible values encode edin ve empty array array olarak kalmaliysa json.array kullanin.