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

> json.encode 用に JSON array としてマークされた new table を作成し、source table が指定された場合は 1.#source sequence をコピーします。

<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 を返します。指定された場合、1 with #source の numeric sequence entries だけが new table にコピーされます。
  </ParamField>

  ## 戻り値

  <ResponseField name={"array"} type={"table"}>
    JSON array marker を持つ new table。json.encode はこれを JSON array として serializes します。original source table は返されません。
  </ResponseField>

  ## 例

  json.encode が値を JSON array として serializes するように array-marked copy を作成します。

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