if (ticket == null) {
return null;
}
try {
Gson gson = gson(
new ExcludeField("com.gitblit.models.TicketModel$Attachment.content"),
new ExcludeField("com.gitblit.models.TicketModel$Attachment.deleted"),
new ExcludeField("com.gitblit.models.TicketModel$Comment.deleted"));
return gson.toJson(ticket);
} catch (Exception e) {
// won't happen
}
return null;