org.apache.jackrabbit.commons.json
Class JsonParser

java.lang.Object
  extended by org.apache.jackrabbit.commons.json.JsonParser

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 Summary
JsonParser(JsonHandler jsonHandler)
          Create a new JSONParser with the specified JSONHandler.
 
Method Summary
 void parse(InputStream input, String charSetName)
           
 void parse(Reader reader)
           
 void parse(String str)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsonParser

public JsonParser(JsonHandler jsonHandler)
Create a new JSONParser with the specified JSONHandler.

Parameters:
jsonHandler - A JSONHandler
Method Detail

parse

public void parse(String str)
           throws IOException
Parameters:
str - String to be parsed
Throws:
IOException - If an error occurs.

parse

public void parse(InputStream input,
                  String charSetName)
           throws IOException
Parameters:
input - InputStream to be parsed.
charSetName - Name of the charset to be used.
Throws:
IOException - If an error occurs.

parse

public void parse(Reader reader)
           throws IOException
Parameters:
reader - The reader
Throws:
IOException - If an error occurs.


Copyright © 2004-2010 The Apache Software Foundation. All Rights Reserved.