Class JsonParser

java.lang.Object
sk.antons.json.parse.JsonParser

public class JsonParser extends Object
Json text parser. Converts json data from string format to tree of objects.
Author:
antons
  • Constructor Details

    • JsonParser

      public JsonParser()
  • Method Details

    • parse

      public static JsonValue parse(String json)
      Parse json from string.
      Parameters:
      json - string with json object array of just literal.
      Returns:
      Json value representing the json data.
    • parse

      public static JsonValue parse(Reader json)
      Parse json from reader.
      Parameters:
      json - reader with json object array of just literal.
      Returns:
      Json value representing the json data.
    • parsePrefetched

      public static JsonValue parsePrefetched(Reader json)
      Parse json from reader. But first it reads as String and than parse it as string. It is faster for small jsnons.
      Parameters:
      json - reader with json object array of just literal.
      Returns:
      Json value representing the json data.
    • parse

      public static JsonValue parse(JsonSource source)
      Parse json from source.
      Parameters:
      source - json source data.
      Returns:
      Json value representing the json data.