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

> Декодирует 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
  ```

  ## Аргументы

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

  ## Возвраты

  <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 выбрасывают Luau error с near-position suffix.
  </ResponseField>

  ## Пример

  Декодирует 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>
