Function tvm::ffi::EscapeStringJSON

Function tvm::ffi::EscapeStringJSON#

Function Documentation#

inline String tvm::ffi::EscapeStringJSON(const String &value)#

Return a JSON-escaped version of the string (RFC 8259).

Uses \\uXXXX for control characters, escapes \\/, \\b, \\f per the JSON spec. Non-ASCII bytes are passed through as-is (valid UTF-8 is preserved).

Parameters:

value – The input string

Returns:

The escaped string, quoted with double quotes