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

> Decode JSON string escape sequences จาก escaped string content หรือจาก complete quoted JSON string literal อินพุตถูก parse ด้วย JSON string parser ไม่ใช่ full JSON document

<div className="real-function-page">
  ```lua theme={null}
  json.unescape(text: string): string
  ```

  ## Arguments

  <ParamField path={"text"} type={"string"} required>
    Escaped JSON string content หรือ complete quoted JSON string literal ที่ first and last bytes เป็น quotes function อ่าน argument นี้ด้วย string type checking
  </ParamField>

  ## Returns

  <ResponseField name={"text"} type={"string"}>
    Decoded string. Supported escapes รวม ", \\, /, \b, \f, \n, \r, \t และ \uXXXX พร้อม surrogate-pair handling. Invalid escapes, unescaped control characters, unterminated strings และ trailing characters หลัง quoted literal จะ throw Luau error พร้อม near-position suffix
  </ResponseField>

  ## ตัวอย่าง

  Decode JSON string escapes จาก escaped content หรือ quoted JSON string literal

  ```lua theme={null}
  local escaped = json.escape("Real Docs" .. string.char(10) .. "Docs")
  local restored = json.unescape(escaped)

  print(restored)
  ```
</div>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.