code: public static <P extends ParaObject> String toJSON(P obj) {
  		if (obj == null) {
  			return "{}";
  		}
  		try {
  			return getJsonWriter().writeValueAsString(obj);
  		} catch (Exception e) {
  			logger.error(null, e);
  		}
  		return "{}";
  	}
docs: Converts a domain object to JSON.
  
  @param <P> type of object to convert
  @param obj a domain object
  @return the JSON representation of that object