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