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

> Parsuje JSON string i ponownie encode'uje go przez Real default non-pretty JSON encoder output.

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

  ## Argumenty

  <ParamField path={"json"} type={"string"} required>
    JSON string parsowany przed minifying. Function czyta ten argument przez string type checking.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options uzywane podczas parsing input JSON. boolean ustawia useNull. table moze ustawic useNull i maxDepth.
  </ParamField>

  ## Zwroty

  <ResponseField name={"minified"} type={"string"}>
    JSON string utworzony po parsing i re-encoding input z default encode options.
  </ResponseField>

  ## Typy

  ### DecodeOptions

  Kontroluje zachowanie analizy JSON.

  | Name       | Type      | Required | Opis                                                                            |
  | ---------- | --------- | -------- | ------------------------------------------------------------------------------- |
  | `useNull`  | `boolean` | No       | Reprezentuje JSON null ze wskaźnikiem null biblioteki zamiast nil.              |
  | `maxDepth` | `integer` | No       | Ustawia maksymalną głębokość zagnieżdżenia, zaciśniętą w zakresie od 1 do 4096. |

  ## Przykład

  Parse valid JSON i re-encode przez default compact JSON output.

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

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