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 . |
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-2020 The Apache Software Foundation. All Rights Reserved.