public class JsonParser extends Object
JsonParser
parses and validates the JSON object passed upon
parse(String)
or parse(InputStream, String)
and notifies
the specified JsonHandler
Constructor and Description |
---|
JsonParser(JsonHandler jsonHandler)
Create a new
JSONParser with the specified JSONHandler . |
Modifier and Type | Method and Description |
---|---|
void |
parse(InputStream input,
String charSetName) |
void |
parse(Reader reader) |
void |
parse(String str) |
public JsonParser(JsonHandler jsonHandler)
JSONParser
with the specified JSONHandler
.jsonHandler
- A JSONHandler
public void parse(String str) throws IOException
str
- String to be parsedIOException
- If an error occurs.public void parse(InputStream input, String charSetName) throws IOException
input
- InputStream to be parsed.charSetName
- Name of the charset to be used.IOException
- If an error occurs.public void parse(Reader reader) throws IOException
reader
- The readerIOException
- If an error occurs.Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.