MCPcopy Create free account
hub / github.com/google/gson / isControlCharacter

Method isControlCharacter

src/main/java/com/google/gson/Escaper.java:134–140  ·  view source on GitHub ↗
(int codePoint)

Source from the content-addressed store, hash-verified

132 }
133
134 private static boolean isControlCharacter(int codePoint) {
135 // JSON spec defines these code points as control characters, so they must be escaped
136 return codePoint < 0x20
137 || codePoint == 0x2028 // Line separator
138 || codePoint == 0x2029 // Paragraph separator
139 || (codePoint >= 0x7f && codePoint <= 0x9f);
140 }
141
142 private static void appendHexJavaScriptRepresentation(int codePoint, Appendable out)
143 throws IOException {

Callers 1

escapeJsonStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected