Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andeya/erpc
/ ExampleToJSONStr
Function
ExampleToJSONStr
utils/json_str_test.go:7–14 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
5
)
6
7
func
ExampleToJSONStr() {
8
s := `<>&{}
""
`
9
fmt.Printf(
"%s\n"
, ToJSONStr([]byte(s), true))
10
fmt.Printf(
"%s\n"
, ToJSONStr([]byte(s), false))
11
// Output:
12
// "\u003c\u003e\u0026{}\"\""
13
// "<>&{}\"\""
14
}
Callers
nothing calls this directly
Calls
2
ToJSONStr
Function · 0.85
Printf
Method · 0.65
Tested by
no test coverage detected