Class JsonUtil

java.lang.Object
org.jolokia.server.core.util.JsonUtil

public class JsonUtil extends Object
Utility for JSON handling
Since:
13/01/16
Author:
roland
  • Constructor Details

    • JsonUtil

      public JsonUtil()
  • Method Details

    • addJSONObjectToJSONObject

      public static void addJSONObjectToJSONObject(org.json.simple.JSONObject pMap, String pKey, org.json.simple.JSONObject pValue)
      Add a Map value to another Map but dont override an existing value. If a single value already exists for this key, the value is converted to a JSONArray and the old and new values are added. If the existing value already is a list, the add the new value to this list.
      Parameters:
      pMap - the map to add to
      pKey - the key under which to add
      pValue - the map value to add to this map.