Class JsonParser

java.lang.Object
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 Details

    • JsonParser

      public JsonParser(JsonHandler jsonHandler)
      Create a new JSONParser with the specified JSONHandler.
      Parameters:
      jsonHandler - A JSONHandler
  • Method Details

    • 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.