if (!issueComments.isEmpty()) {
json.name("comments").beginArray();
String login = UserSession.get().login();
for (IssueComment comment : issueComments) {
String userLogin = comment.userLogin();
User user = userLogin != null ? usersByLogin.get(userLogin) : null;
json.beginObject()
.prop("key", comment.key())
.prop("login", comment.userLogin())
.prop("userName", user != null ? user.name() : null)
.prop("htmlText", Markdown.convertToHtml(comment.markdownText()))
.prop("markdown", comment.markdownText())
.prop("updatable", login != null && login.equals(userLogin))
.prop("createdAt", DateUtils.formatDateTime(comment.createdAt()))
.endObject();