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

> JSON string을 parse한 뒤 Real default non-pretty JSON encoder output으로 re-encode합니다.

<div className="real-function-page">
  ```lua theme={null}
  json.minify(json: string, options?: DecodeOptions): string
  ```

  ## 인수

  <ParamField path={"json"} type={"string"} required>
    Minifying 전에 parse되는 JSON string입니다. function은 이 argument를 string type checking으로 읽습니다.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Input JSON parsing 중 사용하는 optional decode options입니다. boolean은 useNull을 설정합니다. table은 useNull과 maxDepth를 설정할 수 있습니다.
  </ParamField>

  ## 반환값

  <ResponseField name={"minified"} type={"string"}>
    Input을 parsing하고 default encode options로 re-encoding한 뒤 생성되는 JSON string입니다.
  </ResponseField>

  ## 타입

  ### DecodeOptions

  JSON 구문 분석 동작을 제어합니다.

  | Name       | Type      | Required | 설명                                             |
  | ---------- | --------- | -------- | ---------------------------------------------- |
  | `useNull`  | `boolean` | No       | nil 대신 라이브러리의 null 센티널을 사용하여 JSON null을 나타냅니다. |
  | `maxDepth` | `integer` | No       | 1부터 4096까지 고정된 최대 중첩 깊이를 설정합니다.                |

  ## 예제

  Valid JSON을 parse한 뒤 default compact JSON output으로 re-encode합니다.

  ```lua theme={null}
  local formatted = [[{
      "name": "Real",
      "enabled": true,
      "missing": null
  }]]

  print(json.minify(formatted, {
      useNull = true,
  }))
  ```
</div>
