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

> Создает new table, помеченную как JSON array для json.encode, копируя sequence 1.#source, если передана source table.

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

  ## Аргументы

  <ParamField path={"source"} type={"table"}>
    Optional source table. Если аргумент опущен или nil, json.array возвращает new empty array-marked table. Если передан, только numeric sequence entries от 1 with #source копируются в new table.
  </ParamField>

  ## Возвраты

  <ResponseField name={"array"} type={"table"}>
    New table с JSON array marker. json.encode serializes ее как JSON array; original source table не возвращается.
  </ResponseField>

  ## Пример

  Создайте array-marked copy, чтобы json.encode serializes значение как JSON array.

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