escapeJSONPointer escapes a JSON pointer path segment (RFC 6901).
(s string)
| 105 | |
| 106 | // escapeJSONPointer escapes a JSON pointer path segment (RFC 6901). |
| 107 | func escapeJSONPointer(s string) string { |
| 108 | return strings.NewReplacer("~", "~0", "/", "~1").Replace(s) |
| 109 | } |