Package org.apache.groovy.json.internal

# 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 Summary

  Constructors
  Constructor
  Description
  `JsonStringDecoder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `decode(char[] chars, int start, int to)`
  Decodes a JSON string slice, avoiding extra work when no escapes are present.
  `static String`
  `decodeForSure(char[] chars, int start, int to)`
  Decodes a JSON string slice assuming escape processing may be required.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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