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

> Parsed einen JSON string und encoded ihn mit Real default non-pretty JSON encoder output neu.

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

  ## Argumente

  <ParamField path={"json"} type={"string"} required>
    JSON string, der vor dem minifying parsed wird. Die function liest dieses argument mit string type checking.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options fuer das parsing des input JSON. Ein boolean setzt useNull. Eine table kann useNull und maxDepth setzen.
  </ParamField>

  ## Rückgaben

  <ResponseField name={"minified"} type={"string"}>
    JSON string, der nach parsing und re-encoding des input mit default encode options erzeugt wird.
  </ResponseField>

  ## Typen

  ### DecodeOptions

  Steuert das JSON-Parsing-Verhalten.

  | Name       | Type      | Required | Beschreibung                                                                 |
  | ---------- | --------- | -------- | ---------------------------------------------------------------------------- |
  | `useNull`  | `boolean` | No       | Stellt JSON Null mit dem Null-Sentinel der Bibliothek anstelle von Null dar. |
  | `maxDepth` | `integer` | No       | Legt die maximale Verschachtelungstiefe fest, geklemmt von 1 bis 4096.       |

  ## Beispiel

  Parse valid JSON und re-encode es mit default compact JSON output.

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

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