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

> Cree une new table marked as a JSON object pour que Real JSON encoder la traite comme object.

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

  ## Arguments

  <ParamField path={"source"} type={"table"}>
    Optional source table a copy dans la new object table. Si omitted ou nil, une empty object table est renvoyee.
  </ParamField>

  ## Retours

  <ResponseField name={"object"} type={"table"}>
    New table marked avec Real JSON object marker. Source entries sont copy, sauf Real JSON type marker.
  </ResponseField>

  ## Exemple

  Create une new table marked as a JSON object, y compris un 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>
