Saltar al contenido principal

Argumentos

string
requerido
JSON string que se parsea. La function lee este argument con string type checking.
DecodeOptions
Optional decode options. Un boolean define useNull. Una table puede definir useNull y maxDepth.

Retornos

any
Decoded value. JSON objects y arrays se vuelven tables con JSON type markers, strings se vuelven Lua strings, numbers se vuelven Lua numbers, booleans se vuelven booleans, y null se vuelve json.null salvo que useNull sea false.

Tipos

DecodeOptions

Controla el comportamiento de análisis de JSON.

Ejemplo

Parse JSON con la misma function usada por json.decode.