parseJSON5StringLiteral

fnbool parseJSON5StringLiteral(out string result, const(char)[] text, out Json5ErrorCode errCode) @safe

Decode a JSON5 string literal (single or double quoted) into a D string.

Supports JSON5 features:

  • Quotes: both single `'...'` and double `"..."`.
  • Escapes: \n, \r, \t, \b, \f, `\'`, `\"`, `\\`, \0 (not followed by digit),

hex \xNN, Unicode \uNNNN, and extended Unicode \u{HEX...} (1–6 hex digits).

  • Line continuations: a backslash followed by a line terminator (\n, \r, or \r\n) is removed

without producing a character.

Returns

true on success, putting the decoded text into out result. On failure, returns false

and leaves result unmodified.

fnbool parseJSON5StringLiteral(out string result, const(char)[] text) @safe

Decode a JSON5 string literal.

This overload returns only success/failure and is preserved for backward compatibility. For error classification, use the overload that returns a Json5ErrorCode.