Class JsonStringDecoder

java.lang.Object
org.apache.groovy.json.internal.JsonStringDecoder

public class JsonStringDecoder extends Object
Decodes JSON string escape sequences from character buffers.
  • Constructor Details

    • JsonStringDecoder

      public JsonStringDecoder()
  • Method Details

    • decode

      public static String decode(char[] chars, int start, int to)
      Decodes a JSON string slice, avoiding extra work when no escapes are present.
      Parameters:
      chars - source character buffer
      start - inclusive start index
      to - exclusive end index
      Returns:
      decoded string value
    • decodeForSure

      public static String decodeForSure(char[] chars, int start, int to)
      Decodes a JSON string slice assuming escape processing may be required.
      Parameters:
      chars - source character buffer
      start - inclusive start index
      to - exclusive end index
      Returns:
      decoded string value