Extract JSON generation to CommitSerializer.
Extract comment JSON to CommentSerializer