Class MyJSONObject

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
com.github.cliftonlabs.json_simple.JsonObject
se.datadosen.util.MyJSONObject
All Implemented Interfaces:
com.github.cliftonlabs.json_simple.Jsonable, Serializable, Cloneable, Map<String,Object>

public class MyJSONObject extends com.github.cliftonlabs.json_simple.JsonObject
Note: Since v16, this class inherits from JsonObject instead of from JSONObject as we now use the updated json-simple3.0.1 library
See Also:
  • Constructor Details

    • MyJSONObject

      public MyJSONObject()
  • Method Details

    • putNotEmpty

      public Object putNotEmpty(String key, Object value)
      Not exactly same as putIfAbsent from super class. Investigate later.
      Parameters:
      key -
      value -
      Returns:
    • put

      public Object put(String key, String[] arr)
    • toJSONString

      public String toJSONString()
      Facade for the new toJson() to provide backward and forward compatibility
      Returns:
      serialized JSON string