public abstract class CharacterEscapes extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static int |
ESCAPE_CUSTOM
Value used for lookup tables to indicate that matching characters
will need custom escapes; and that another call
to
getEscapeSequence(int) is needed to figure out exact escape
sequence to output. |
static int |
ESCAPE_NONE
Value used for lookup tables to indicate that matching characters
do not need to be escaped.
|
static int |
ESCAPE_STANDARD
Value used for lookup tables to indicate that matching characters
are to be escaped using standard escaping; for JSON this means
(for example) using "backslash - u" escape method.
|
Constructor and Description |
---|
CharacterEscapes() |
Modifier and Type | Method and Description |
---|---|
abstract int[] |
getEscapeCodesForAscii()
Method generators can call to get lookup table for determining
escape handling for first 128 characters of Unicode (ASCII
characters.
|
abstract SerializableString |
getEscapeSequence(int ch)
Method generators can call to get lookup table for determining
exact escape sequence to use for given character.
|
static int[] |
standardAsciiEscapesForJSON()
Helper method that can be used to get a copy of standard JSON
escape definitions; this is useful when just wanting to slightly
customize definitions.
|
public static final int ESCAPE_NONE
public static final int ESCAPE_STANDARD
public static final int ESCAPE_CUSTOM
getEscapeSequence(int)
is needed to figure out exact escape
sequence to output.public abstract int[] getEscapeCodesForAscii()
ESCAPE_xxx
constants, or non-zero positive
integer (meaning of which is data format specific; for JSON it means
that combination of backslash and character with that value is to be used)
to indicate that specific escape sequence is to be used.public abstract SerializableString getEscapeSequence(int ch)
public static int[] standardAsciiEscapesForJSON()
getEscapeCodesForAscii()
Copyright © 2012 FasterXML. All Rights Reserved.