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

> يعمل parse لـ JSON string ثم يعيد encode له باستخدام Real default non-pretty JSON encoder output.

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

  ## الوسائط

  <ParamField path={"json"} type={"string"} required>
    JSON string يتم parse له قبل minifying. Function تقرأ هذا argument باستخدام string type checking.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options تستخدم اثناء parsing للـ input JSON. boolean يضبط useNull. table يمكنها ضبط useNull و maxDepth.
  </ParamField>

  ## القيم الراجعة

  <ResponseField name={"minified"} type={"string"}>
    JSON string يتم انتاجه بعد parsing و re-encoding للـ input باستخدام default encode options.
  </ResponseField>

  ## الأنواع

  ### DecodeOptions

  يتحكم في سلوك تحليل JSON.

  | Name       | Type      | Required | الوصف                                                 |
  | ---------- | --------- | -------- | ----------------------------------------------------- |
  | `useNull`  | `boolean` | No       | يمثل JSON null مع الحارس الفارغ للمكتبة بدلاً من صفر. |
  | `maxDepth` | `integer` | No       | يضبط الحد الأقصى لعمق التعشيش، المثبت من 1 إلى 4096.  |

  ## مثال

  Parse valid JSON ثم re-encode له باستخدام default compact JSON output.

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

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