code: function encodeSummary(summary) {
      var file = summary.getFile();
      var parts = summary.getParts();
  
      return {
          file: encodeFile(file),
          parts: parts.map(encodeSummaryPart).toJS()
      };
  }
docs: Encode a summary to JSON
  
  @param {Summary}
  @return {Object}