json. isObject Synchronous
Check whether a table will be treated as a JSON object rather than an array. This is a quick shape check before reading named settings from decoded input.
Luau
json.isObject(value: any) -> booleanParameters
| Parameter | Type | Description |
|---|---|---|
value | any | Value to inspect. |
Returns
booleantrue for a table that json.isArray does not classify as an array; false for other value types.
Usage notes
A plain empty table is an object by default. Mark an empty list with json.array when that distinction matters.
Example
Luau
local parsed = json.decode('{"theme":"dark"}')
if json.isObject(parsed) then
print(parsed.theme)
end