> ## 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.object

> Tao new table marked as a JSON object de Real JSON encoder xu ly nhu object.

<div className="real-function-page">
  ```lua theme={null}
  json.object(source?: table): table
  ```

  ## Đối số

  <ParamField path={"source"} type={"table"}>
    Optional source table de copy vao new object table. Neu omitted hoac nil, tra ve empty object table.
  </ParamField>

  ## Giá trị trả về

  <ResponseField name={"object"} type={"table"}>
    New table marked voi Real JSON object marker. Source entries duoc copy, tru Real JSON type marker.
  </ResponseField>

  ## Ví dụ

  Create new table marked as a JSON object, bao gom empty object.

  ```lua theme={null}
  local profile = json.object({
      name = "Guest",
      active = true,
  })
  local empty = json.object()

  print(json.encode(profile))
  print(json.encode(empty))
  ```
</div>
