Code example for JSONStringer

0
	} 
	 
	public JSONStringer getJSON() throws Exception {
		 
		JSONStringer returnJSON = 
				new JSONStringer() 
					.object()
						.key("device").value(this._deviceID == null ? JSONObject.NULL : this._deviceID)
						.key("transferDate").value(this._transferDate == null ? JSONObject.NULL : EPOSHelper.DFDatabase.format(this._transferDate))
						.key("reason").value(this._reason == null ? JSONObject.NULL : this._reason)
						.key("amount").value(this._amount)
						.key("date").value(this._dateCreated == null ? JSONObject.NULL : EPOSHelper.DFDatabase.format(this._dateCreated))
						.key("staff").value(this._createUserID)
						.key("merchant").value(EPOSHelper.CurrentSite.getSiteID()) 
						.key("password").value(EPOSHelper.CurrentSite.getPassword()) 
					.endObject(); 
		 
		return returnJSON;
	} 
}