> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectreal.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# json.type

> Returns a string type name for a value. json.null returns "null". Tables return "array" or "object" using the same table classification as json.isArray and json.isObject. Other values return the runtime Lua type name result.

<div className="real-function-page">
  ```lua theme={null}
  json.type(value: any): string
  ```

  ## Arguments

  <ParamField path={"value"} type={"any"} required>
    Value to classify. Passing no value returns the runtime type name for a missing stack value.
  </ParamField>

  ## Returns

  <ResponseField name={"jsonType"} type={"string"}>
    Type name string. Verified JSON-specific returns are "null", "array", and "object". Non-table, non-json.null values use Lua type name, such as "nil", "boolean", "number", "integer", "string", "function", "object", "thread", "buffer", "class", "object", "vector", or "no value" depending on the runtime value.
  </ResponseField>

  ## Example

  Check the exact type string returned by the JSON helper.

  ```lua theme={null}
  print(json.type(json.array({ "red", "blue" })))
  print(json.type(json.object({ enabled = true })))
  print(json.type(json.null))
  print(json.type(nil))
  print(json.type())
  ```
</div>
