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

> Faz parse de um JSON string e re-encode usando Real default non-pretty JSON encoder output.

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

  ## Argumentos

  <ParamField path={"json"} type={"string"} required>
    JSON string que recebe parse antes de minifying. A function le este argument com string type checking.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options usadas durante o parsing do input JSON. Um boolean define useNull. Uma table pode definir useNull e maxDepth.
  </ParamField>

  ## Retornos

  <ResponseField name={"minified"} type={"string"}>
    JSON string produzido depois do parsing e re-encoding do input com default encode options.
  </ResponseField>

  ## Tipos

  ### DecodeOptions

  Controla o comportamento de análise JSON.

  | Name       | Type      | Required | Descrição                                                               |
  | ---------- | --------- | -------- | ----------------------------------------------------------------------- |
  | `useNull`  | `boolean` | No       | Representa JSON nulo com o sentinela nulo da biblioteca em vez de nulo. |
  | `maxDepth` | `integer` | No       | Define a profundidade máxima de aninhamento, fixada de 1 a 4096.        |

  ## Exemplo

  Parse valid JSON e re-encode com default compact JSON output.

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

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