code: public SourceMap toJSON() {
          SourceMap map = new SourceMap();
          map.version = this._version;
          map.sources = this._sources.toArray();
          map.names = this._names.toArray();
          map.mappings = serializeMappings();
          map.file = this._file;
          map.sourceRoot = this._sourceRoot;
          if (this._sourcesContents != null) {
              map.sourcesContent = _generateSourcesContent(map.sources, this._sourceRoot);
          }
          return map;
      }
docs: Externalize the source map.