Json.borrowString

Reads a string off the JSON text with limited lifetime.

The reference to this slice is not guaranteed to be valid after the JSON parser has been destroyed or another object key or string value has been parsed. So make a copy before you continue parsing.

struct Json(uint vl = validateUsed, bool validateUtf8 = vl > trustedSource)
const(char)[]
borrowString
()
if (
vl > trustedSource ||
!validateUtf8
)

Return Value

Type: const(char)[]

If the string had no escape sequences in it, the returned array is a slice of the JSON text buffer, otherwise temporary copy.

Meta