code: function encodeGlossary(glossary) {
      var file = glossary.getFile();
      var entries = glossary.getEntries();
  
      return {
          file: encodeFile(file),
          entries: entries
              .map(encodeGlossaryEntry).toJS()
      };
  }
docs: Encode a glossary to JSON
  
  @param {Glossary}
  @return {Object}