Package org.apache.groovy.json.internal
Class JsonStringDecoder
java.lang.Object
org.apache.groovy.json.internal.JsonStringDecoder
Decodes JSON string escape sequences from character buffers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringdecode(char[] chars, int start, int to) Decodes a JSON string slice, avoiding extra work when no escapes are present.static StringdecodeForSure(char[] chars, int start, int to) Decodes a JSON string slice assuming escape processing may be required.
-
Constructor Details
-
JsonStringDecoder
public JsonStringDecoder()
-
-
Method Details
-
decode
Decodes a JSON string slice, avoiding extra work when no escapes are present.- Parameters:
chars- source character bufferstart- inclusive start indexto- exclusive end index- Returns:
- decoded string value
-
decodeForSure
Decodes a JSON string slice assuming escape processing may be required.- Parameters:
chars- source character bufferstart- inclusive start indexto- exclusive end index- Returns:
- decoded string value
-