Class JSON

java.lang.Object
net.diversionmc.json.JSON

public class JSON extends Object
Simple Parser example which parses JSON files into JSON.JSONValue objects.
Author:
Kirill Semyonkin - Diversion Network 2021
  • Constructor Details

    • JSON

      public JSON()
  • Method Details

    • from

      public static JSON.JSONValue from(Object object)
      Convert an arbitrary object into JSON. It has to be a Map, Collection, String, null, true, false or a number.
      Parameters:
      object - Object to serialize.
      Returns:
      Serialized object.
    • parse

      public static JSON.JSONValue parse(String text)
      Convert a string into a JSONValue.
      Parameters:
      text - String to parse.
      Returns:
      Parsed JSON storage.