Class JSONHelper

java.lang.Object
net.tnemc.item.JSONHelper

public class JSONHelper extends Object
  • Constructor Details

    • JSONHelper

      public JSONHelper(org.json.simple.JSONObject object)
  • Method Details

    • has

      public boolean has(String identifier)
    • isNull

      public boolean isNull(String identifier)
    • getHelper

      public JSONHelper getHelper(String identifier)
    • getJSON

      public org.json.simple.JSONObject getJSON(String identifier)
    • getShort

      public Short getShort(String identifier)
    • getFloat

      public Float getFloat(String identifier)
    • getDouble

      public Double getDouble(String identifier)
    • getInteger

      public Integer getInteger(String identifier)
    • getBoolean

      public Boolean getBoolean(String identifier)
    • getLong

      public Long getLong(String identifier)
    • getString

      public String getString(String identifier)
    • getUUID

      public UUID getUUID(String identifier)
    • getStringList

      public List<String> getStringList(String identifier)
      Parses a JSON array into a List.
      Parameters:
      identifier - The key of the JSON array.
      Returns:
      A List containing the elements of the JSON array.
    • getIntegerList

      public List<Integer> getIntegerList(String identifier)
      Parses a JSON array into a List.
      Parameters:
      identifier - The key of the JSON array.
      Returns:
      A List containing the elements of the JSON array.
    • getFloatList

      public List<Float> getFloatList(String identifier)
      Parses a JSON array into a List.
      Parameters:
      identifier - The key of the JSON array.
      Returns:
      A List containing the elements of the JSON array.
    • getBooleanList

      public List<Boolean> getBooleanList(String identifier)
      Parses a JSON array into a List.
      Parameters:
      identifier - The key of the JSON array.
      Returns:
      A List containing the elements of the JSON array.
    • getIntArray

      public int[] getIntArray(String identifier)
      Parses a JSON array into an int array.
      Parameters:
      identifier - The key of the JSON array.
      Returns:
      An int[] containing the elements of the JSON array.
    • getObject

      public org.json.simple.JSONObject getObject()
    • setObject

      public void setObject(org.json.simple.JSONObject object)