code: function traversalToJson(traversal) {
          var array = traversal.toList().toArray().map(function (elem) { return asJSON(elem); });
          return JSON.parse(JSON.stringify(array));
      }
docs: #### `function asJSON(traversal: Java.Traversal)` Executes a traversal (synchronously!), returning a json object for all of the returned objects.