org.gridkit.jvmtool.jackson
Class CharacterEscapes

java.lang.Object
  extended by org.gridkit.jvmtool.jackson.CharacterEscapes

public abstract class CharacterEscapes
extends Object

Abstract base class that defines interface for customizing character escaping aspects for String values, for formats that use escaping. For JSON this applies to both property names and String values.

Since:
1.8

Field Summary
static int ESCAPE_CUSTOM
          Value used for lookup tables to indicate that matching characters will need custom escapes; and that another call to #getEscapeSequence 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 Summary
CharacterEscapes()
           
 
Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ESCAPE_NONE

public static final int ESCAPE_NONE
Value used for lookup tables to indicate that matching characters do not need to be escaped.

See Also:
Constant Field Values

ESCAPE_STANDARD

public static final 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.

See Also:
Constant Field Values

ESCAPE_CUSTOM

public static final int ESCAPE_CUSTOM
Value used for lookup tables to indicate that matching characters will need custom escapes; and that another call to #getEscapeSequence is needed to figure out exact escape sequence to output.

See Also:
Constant Field Values
Constructor Detail

CharacterEscapes

public CharacterEscapes()
Method Detail

standardAsciiEscapesForJSON

public 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. Caller can modify this array as it sees fit and usually returns modified instance via #getEscapeCodesForAscii



Copyright © 2019. All Rights Reserved.