Package org.apache.juli
Class JsonFormatter.JSONFilter
java.lang.Object
org.apache.juli.JsonFormatter.JSONFilter
- Enclosing class:
- JsonFormatter
Provides escaping of values so they can be included in a JSON document.
Escaping is based on the definition of JSON found in
RFC 8259.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CharSequence
escape
(CharSequence input, int off, int length) Escape the given char sequence.static String
Escape the given string.
-
Method Details
-
escape
Escape the given string.- Parameters:
input
- the string- Returns:
- the escaped string
-
escape
Escape the given char sequence.- Parameters:
input
- the char sequenceoff
- the offset on which escaping will startlength
- the length which should be escaped- Returns:
- the escaped char sequence corresponding to the specified range
-