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

> JSON string degerini Real JSON parser ile parse eder ve decoded arrays ile objects degerlerini JSON helpers icin isaretleyerek decoded Lua value dondurur.

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

  ## Argümanlar

  <ParamField path={"json"} type={"string"} required>
    Parse edilecek JSON text. parser optional surrounding whitespace iceren tek bir JSON value kabul eder ve invalid syntax veya trailing non-whitespace characters bulursa hata firlatir.
  </ParamField>

  <ParamField path={"options"} type={"DecodeOptions"}>
    Optional decode options. boolean useNull degerini dogrudan ayarlar. table useNull ve maxDepth ayarlayabilir; maxDepth 1 ile 4096 arasinda clamp edilir.
  </ParamField>

  ## Dönüşler

  <ResponseField name={"decoded"} type={"any"}>
    Decoded value. JSON objects ve arrays JSON type markers iceren tables olur, strings Lua strings olur, numbers Lua numbers olur, booleans booleans olur ve null, useNull false degilse json.null olur.
  </ResponseField>

  ## Tipler

  ### DecodeOptions

  JSON ayrıştırma davranışını kontrol eder.

  | Name       | Type      | Required | Açıklama                                                               |
  | ---------- | --------- | -------- | ---------------------------------------------------------------------- |
  | `useNull`  | `boolean` | No       | Nil yerine kütüphanenin null sentinel'i ile JSON null'u temsil eder.   |
  | `maxDepth` | `integer` | No       | 1'den 4096'ya kadar kenetlenmiş maksimum yuvalama derinliğini ayarlar. |

  ## Örnek

  JSON degerini Lua values olarak decode edin ve JSON array, object, null markers degerlerini koruyun.

  ```lua theme={null}
  local value = json.decode('{"name":"Real","tags":["docs"],"missing":null}')

  print(value.name)
  print(value.tags[1])
  print(json.type(value))
  print(json.isNull(value.missing))
  ```
</div>
