Package org.jolokia.server.core.util
Class JsonUtil
java.lang.Object
org.jolokia.server.core.util.JsonUtil
Utility for JSON handling
- Since:
- 13/01/16
- Author:
- roland
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddJSONObjectToJSONObject(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.
-
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 aJSONArrayand 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 topKey- the key under which to addpValue- the map value to add to this map.
-