@Override public String toJSON() { return SerializationUtils.toJson(id); }
@Override public String toJson() { return SerializationUtils.toJson(documentMap); }
@Override public String toJSON() { return SerializationUtils.toJson(id); }
@Override public String toString() { return SerializationUtils.toJson(this); }
@Override public String toString() { return SerializationUtils.toJson(stageGroups.values()); }
/** * Method for verifying what class the passed Object will get if serialized and then deserialized via this class. */ public static Class<?> getResultingClass(Object o) { return getResultingClass(toJson(o)); }
public String toJson() { Map<String, Object> x = new HashMap<String, Object>(); x.put("equals", equals); x.put("notEquals", notEquals); x.put("exists", exists); x.put("touched", touched); if(action!=null) { x.put("action", action.toString()); } return SerializationUtils.toJson(x); }
protected static void printJson(HttpResponse response, Object o) { logger.debug("Printing a JSON response."); response.setStatusCode(HttpStatus.SC_OK); setStringEntity(response, SerializationUtils.toJson(o)); }
public boolean saveFile(DocumentFile<Local> df) { try { HttpResponse response = core.post(getFileUrl(df), SerializationUtils.toJson(df)); int code = response.getStatusLine().getStatusCode(); if (code == HttpStatus.SC_OK || code == HttpStatus.SC_NO_CONTENT) { EntityUtils.consume(response.getEntity()); return true; } else { logUnexpected("saveFile()", response); return false; } } catch(IOException e) { // TODO: Something else here? throw new RuntimeException(e); } }
try { JsonDeserializer jd = (JsonDeserializer) field.getType().newInstance(); jd.fromJson(SerializationUtils.toJson(map.get(parameterName))); field.set(o, jd); } catch (InstantiationException e) {
map.put(ACTION_KEY, getAction()); return SerializationUtils.toJson(map);