Class JsonSerialiser
java.lang.Object
info.oais.implementation.infomodel.JsonSerialiser
public class JsonSerialiser extends Object
JsonSerialiser - to keep all code in one place.
 Usage: when the object on is to be serialised as JSON then 
js = new JsonSerialiser();
JSONObject jo = new JSONObject();
js.addElement(jo, obj);
String str = jo.toJSONString();
Then write out str.
js = new JsonSerialiser();
JSONObject jo = new JSONObject();
js.addElement(jo, obj);
String str = jo.toJSONString();
Then write out str.
- Author:
- David
- 
Constructor SummaryConstructors Constructor Description JsonSerialiser()JsonSerialiser constructor
- 
Method SummaryModifier and Type Method Description org.json.simple.JSONObjectaddElement(org.json.simple.JSONObject jo, Object ob)Add JSON components
- 
Constructor Details- 
JsonSerialiserpublic JsonSerialiser()JsonSerialiser constructor
 
- 
- 
Method Details- 
addElementAdd JSON components- Parameters:
- jo- The JSONObject to which to add
- ob- Object to be serialised
- Returns:
- The JSONObject
 
 
-