json.isObject Synchronous

Check whether the JSON library classifies a value as an object. Use it to check that parsed input is an object before reading named settings. It recognizes marked objects and tables that are not classified as arrays.

Syntax
Luau
json.isObject(value: any) -> boolean

Parameters

Function parameters
ParameterTypeDescription
valueanyValue to inspect without encoding it.

Returns

boolean

true if the value is classified as an object; otherwise false.

Example

Example
Luau
local value = json.decode('{"theme":"dark"}')
if json.isObject(value) then
    print(value.theme)
end
print(json.isObject(json.array())) -- false
Kawaii documentation