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

> Mem-parse JSON string lalu meng-encode ulang dengan Real default non-pretty JSON encoder output.

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

  ## Argumen

  <ParamField path={"json"} type={"string"} required>
    JSON string yang di-parse sebelum minifying. Function membaca argument ini dengan string type checking.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options yang dipakai saat parsing input JSON. boolean mengatur useNull. table dapat mengatur useNull dan maxDepth.
  </ParamField>

  ## Return

  <ResponseField name={"minified"} type={"string"}>
    JSON string yang dibuat setelah parsing dan re-encoding input dengan default encode options.
  </ResponseField>

  ## Tipe

  ### DecodeOptions

  Mengontrol perilaku penguraian JSON.

  | Name       | Type      | Required | Deskripsi                                                         |
  | ---------- | --------- | -------- | ----------------------------------------------------------------- |
  | `useNull`  | `boolean` | No       | Mewakili JSON null dengan penjaga null perpustakaan, bukan nihil. |
  | `maxDepth` | `integer` | No       | Menyetel kedalaman sarang maksimum, dijepit dari 1 hingga 4096.   |

  ## Contoh

  Parse valid JSON lalu re-encode dengan default compact JSON output.

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

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