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

> ينشئ new table marked as a JSON object حتى يعاملها Real JSON encoder كـ object.

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

  ## الوسائط

  <ParamField path={"source"} type={"table"}>
    Optional source table يتم copy لها داخل new object table. اذا كانت omitted او nil، يتم ارجاع empty object table.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"object"} type={"table"}>
    New table marked مع Real JSON object marker. Source entries يتم copy لها، باستثناء Real JSON type marker.
  </ResponseField>

  ## مثال

  Create new table marked as a JSON object، بما في ذلك 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>
