de.cau.cs.kieler.sim.kiem.execution
Class JSONMerger
java.lang.Object
de.cau.cs.kieler.sim.kiem.execution.JSONMerger
public class JSONMerger
- extends Object
The Class JSONMerger implements the merging functionality of used by the DataPool. It is able to
merge two JSONObjects (that are lists of key-value-pairs) into one object.
- Rating

- (2009-01-15)
Constructor Summary |
JSONMerger()
Instantiates a new jSON merger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JSONMerger
public JSONMerger()
- Instantiates a new jSON merger.
mergeObjects
public JSONObject mergeObjects(JSONObject base,
JSONObject merge)
throws JSONException
- Merges two JSON objects together (recursively), with values from "merge" replacing values in
"base" to produce a new object.
- Parameters:
base
- The base object that values will be replaced into.merge
- The object to merge values from.
- Returns:
- the JSON object
- Throws:
JSONException
- if the two objects can't be merged for some reason.