Skip to main content

Argumenty

string
wymagane
JSON text do parsowania. parser akceptuje jedna JSON value z optional surrounding whitespace i rzuca blad przy invalid syntax albo trailing non-whitespace characters.
DecodeOptions
Optional decode options. boolean ustawia useNull bezposrednio. table moze ustawic useNull i maxDepth; maxDepth jest clamp od 1 do 4096.

Zwroty

any
Decoded value. JSON objects i arrays staja sie tables z JSON type markers, strings staja sie Lua strings, numbers staja sie Lua numbers, booleans staja sie booleans, a null staje sie json.null, chyba ze useNull jest false.

Typy

DecodeOptions

Kontroluje zachowanie analizy JSON.

Przykład

Decode JSON do Lua values z zachowaniem JSON array, object i null markers.