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

> Erstellt eine new table, die fuer json.encode als JSON array markiert ist, und kopiert die 1.#source sequence, wenn eine source table uebergeben wird.

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

  ## Argumente

  <ParamField path={"source"} type={"table"}>
    Optional source table. Wenn ausgelassen oder nil, gibt json.array eine new empty array-marked table zurueck. Wenn uebergeben, werden nur numeric sequence entries von 1 with #source in die new table kopiert.
  </ParamField>

  ## Rückgaben

  <ResponseField name={"array"} type={"table"}>
    New table mit JSON array marker. json.encode serializes sie als JSON array; die original source table wird nicht zurueckgegeben.
  </ResponseField>

  ## Beispiel

  Erstelle eine array-marked copy, damit json.encode den Wert als JSON array serializes.

  ```lua theme={null}
  local tags = json.array({ "api", "docs", "luau" })
  local empty = json.array()

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