Développeur
toObject
Convertir une chaîne JSON en objet Lua.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Convertir une chaîne JSON en objet Lua.
developer:toObject(jsonString)
| Nom | Type | Description |
|---|---|---|
jsonString | string | Chaîne formatée en JSON. |
| Type | Description |
|---|---|
object | Objet Lua analysé. |
local json = '{"name":"Item","value":100}'
local obj = toObject(json)
global:printMessage(obj.name .. " = " .. obj.value)