public interface JsonParser
This is the parser interface that backs the new JsonSlurper. It was derived from the Boon JSON parser.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
parse(String jsonString)Parses JSON text from a String. |
|
public Object |
parse(byte[] bytes)Parses JSON text from a byte array. |
|
public Object |
parse(byte[] bytes, String charset)Parses JSON text from a byte array using the supplied charset. |
|
public Object |
parse(CharSequence charSequence)Parses JSON text from a character sequence. |
|
public Object |
parse(char[] chars)Parses JSON text from a character array. |
|
public Object |
parse(Reader reader)Parses JSON text read from a Reader. |
|
public Object |
parse(InputStream input)Parses JSON content read from an input stream. |
|
public Object |
parse(InputStream input, String charset)Parses JSON content read from an input stream using the supplied charset. |
|
public Object |
parse(File file, String charset)Parses JSON content read from a file using the supplied charset. |
Parses JSON text from a String.
jsonString - the JSON text to parseParses JSON text from a byte array.
bytes - the JSON bytes to parseParses JSON text from a byte array using the supplied charset.
bytes - the JSON bytes to parsecharset - the charset used to decode the bytesParses JSON text from a character sequence.
charSequence - the JSON text to parseParses JSON text from a character array.
chars - the JSON characters to parseParses JSON text read from a Reader.
reader - the reader supplying JSON textParses JSON content read from an input stream.
input - the input stream supplying JSON contentParses JSON content read from an input stream using the supplied charset.
input - the input stream supplying JSON contentcharset - the charset used to decode the stream