Package JsonFse

Class JsonParser


  • public class JsonParser
    extends java.lang.Object
    Simple JSON parser. It parses strings according to the grammer given in the package documentation. It builds a recursive tree reflecting the structure of the JSON object.
    Author:
    Friedemann Seebass
    • Constructor Summary

      Constructors 
      Constructor Description
      JsonParser()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NodeObj createTree​(java.lang.String str)
      Creates from the JSON object, given as a String in parameter str, a recursive tree representing the JSON object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JsonParser

        public JsonParser()
    • Method Detail

      • createTree

        public NodeObj createTree​(java.lang.String str)
                           throws ParseErrorEx
        Creates from the JSON object, given as a String in parameter str, a recursive tree representing the JSON object.
        Parameters:
        str - the JSON object to parse, given as Java String
        Returns:
        the root node of the created tree
        Throws:
        ParseErrorEx - Is thrown if the parser detects an error in the string.