MCPcopy Create free account
hub / github.com/go-json-experiment/json / EscapeForJS

Function EscapeForJS

jsontext/alias.go:267–269  ·  view source on GitHub ↗

EscapeForJS specifies that U+2028 and U+2029 characters within JSON strings should be escaped as a hexadecimal Unicode codepoint (e.g., \u2028) so that the output is valid to embed within JavaScript. See RFC 8259, section 12. This only affects encoding and is ignored when decoding.

(v bool)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

ExampleEscapeForHTMLFunction · 0.92
FuzzValueFormatFunction · 0.70

Calls

no outgoing calls

Tested by 2

ExampleEscapeForHTMLFunction · 0.74
FuzzValueFormatFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…