code: def to_json(self, validate=False, pretty_print=True, data_path=None):
          
          # TODO: support writing to separate file
          return super(self.__class__, self).to_json(validate=validate,
                                                     pretty_print=pretty_print)
docs: Convert data to JSON
  
          Parameters
          ----------
          data_path : string
              If not None, then data is written to a separate file at the
              specified path. Note that the ``url`` attribute if the data must
              be set independently for the data to load correctly.
  
          Returns
          -------
          string
              Valid Vega JSON.