Package groovy.json

# Interface JsonParser

All Known Implementing Classes:
  `BaseJsonParser`, `JsonFastParser`, `JsonParserCharArray`, `JsonParserLax`, `JsonParserUsingCharacterSource`

public interface JsonParser
This is the parser interface that backs the new JsonSlurper. It was derived from the Boon JSON parser.

Since:
  2.3.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `parse(byte[] bytes)`
  Parses JSON text from a byte array.
  `Object`
  `parse(byte[] bytes, String charset)`
  Parses JSON text from a byte array using the supplied charset.
  `Object`
  `parse(char[] chars)`
  Parses JSON text from a character array.
  `Object`
  `parse(File file, String charset)`
  Parses JSON content read from a file using the supplied charset.
  `Object`
  `parse(InputStream input)`
  Parses JSON content read from an input stream.
  `Object`
  `parse(InputStream input, String charset)`
  Parses JSON content read from an input stream using the supplied charset.
  `Object`
  `parse(Reader reader)`
  Parses JSON text read from a `Reader`.
  `Object`
  `parse(CharSequence charSequence)`
  Parses JSON text from a character sequence.
  `Object`
  `parse(String jsonString)`
  Parses JSON text from a `String`.

- ## Method Details

  - ### parse

    Object parse(String jsonString)
    Parses JSON text from a `String`.
    Parameters:
      `jsonString` - the JSON text to parse
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(byte[] bytes)
    Parses JSON text from a byte array.
    Parameters:
      `bytes` - the JSON bytes to parse
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(byte[] bytes, String charset)
    Parses JSON text from a byte array using the supplied charset.
    Parameters:
      `bytes` - the JSON bytes to parse
      `charset` - the charset used to decode the bytes
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(CharSequence charSequence)
    Parses JSON text from a character sequence.
    Parameters:
      `charSequence` - the JSON text to parse
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(char[] chars)
    Parses JSON text from a character array.
    Parameters:
      `chars` - the JSON characters to parse
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(Reader reader)
    Parses JSON text read from a `Reader`.
    Parameters:
      `reader` - the reader supplying JSON text
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(InputStream input)
    Parses JSON content read from an input stream.
    Parameters:
      `input` - the input stream supplying JSON content
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(InputStream input, String charset)
    Parses JSON content read from an input stream using the supplied charset.
    Parameters:
      `input` - the input stream supplying JSON content
      `charset` - the charset used to decode the stream
    Returns:
      the parsed JSON data structure

  - ### parse

    Object parse(File file, String charset)
    Parses JSON content read from a file using the supplied charset.
    Parameters:
      `file` - the file supplying JSON content
      `charset` - the charset used to decode the file
    Returns:
      the parsed JSON data structure