try {
// dates are sent to the client using a fixed format, the one returned by GeneralUtilities.getServerDateFormat()
SimpleDateFormat dateFormat = new SimpleDateFormat();
dateFormat.applyPattern(GeneralUtilities.getServerTimeStampFormat());
ObjNote note = (ObjNote) o;
result = new JSONObject();
result.put(ID, note.getId() );
result.put(BIN_ID, note.getBinId() );
result.put(BIOBJ_ID, note.getBiobjId() );
result.put(NOTES, note.getNotes() );
result.put(OWNER, note.getOwner() );
Date creationDate = note.getCreationDate();
String creationDateStr = dateFormat.format(creationDate);
result.put(CREATION_DATE, creationDateStr );
Date lastChangeDate = note.getLastChangeDate();
String lastChangeDateStr = dateFormat.format(lastChangeDate);
result.put(LAST_MODIFICATION_DATE, lastChangeDateStr );
result.put(VISIBILITY, note.getIsPublic() );
result.put(DELETABLE, note.getIsDeletable() );
} catch (Throwable t) {
throw new SerializationException("An error occurred while serializing object: " + o, t);
} finally {