Skip to main content

Đối số

string
bắt buộc
JSON string de parse. Function doc argument nay bang string type checking.
DecodeOptions
Optional decode options. boolean dat useNull. table co the dat useNull va maxDepth.

Giá trị trả về

any
Decoded value. JSON objects va arrays tro thanh tables voi JSON type markers, strings tro thanh Lua strings, numbers tro thanh Lua numbers, booleans tro thanh booleans, va null tro thanh json.null tru khi useNull la false.

Kiểu

DecodeOptions

Kiểm soát hành vi phân tích cú pháp JSON.

Ví dụ

Parse JSON bang cung function duoc json.decode su dung.