(int codePoint)
| 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 { |