CharacterEscapes implementation that escapes
Unicode characters `0x2028` and `0x2029` (in addition to characters
escaped otherwise), which are apparently considered linefeeds as
per newer Javascript specifications, and consequently problematic
when using JSONP (see https://en.wikipedia.org/wiki/JSONP).
| Modifier and Type | Field and Description |
|---|---|
| private static final int[] | |
| private static final SerializedString | |
| private static final SerializedString | |
| private static final long | |
| private static final JsonpCharacterEscapes |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public int[] | getEscapeCodesForAscii()
Implements abstract com. |
| public SerializableString | getEscapeSequence(int
Character to look escape sequence for ch)Implements abstract com. |
| public static JsonpCharacterEscapes |
| asciiEscapes | back to summary |
|---|---|
| private static final int[] asciiEscapes | |
| escapeFor2028 | back to summary |
|---|---|
| private static final SerializedString escapeFor2028 | |
| escapeFor2029 | back to summary |
|---|---|
| private static final SerializedString escapeFor2029 | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| sInstance | back to summary |
|---|---|
| private static final JsonpCharacterEscapes sInstance | |
| JsonpCharacterEscapes | back to summary |
|---|---|
| public JsonpCharacterEscapes() | |
| getEscapeCodesForAscii | back to summary |
|---|---|
| public int[] getEscapeCodesForAscii() Implements abstract com. Doc from com. Method generators can call to get lookup table for determining escape handling for first 128 characters of Unicode (ASCII characters. Caller is not to modify contents of this array, since this is expected to be a shared copy.
| |
| getEscapeSequence | back to summary |
|---|---|
| public SerializableString getEscapeSequence(int ch) Implements abstract com. Doc from com. Method generators can call to get lookup table for determining exact escape sequence to use for given character. It can be called for any character, but typically is called for either for ASCII characters for which custom escape sequence is needed; or for any non-ASCII character.
| |
| instance | back to summary |
|---|---|
| public static JsonpCharacterEscapes instance() | |