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

> Erstellt eine new table marked as a JSON object, damit Real JSON encoder sie als object behandelt.

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

  ## Argumente

  <ParamField path={"source"} type={"table"}>
    Optional source table, die in die new object table kopiert wird. Wenn omitted oder nil, wird eine empty object table zurueckgegeben.
  </ParamField>

  ## Rückgaben

  <ResponseField name={"object"} type={"table"}>
    New table marked mit Real JSON object marker. Source entries werden kopiert, ausser Real JSON type marker.
  </ResponseField>

  ## Beispiel

  Create eine new table marked as a JSON object, einschliesslich 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>
