def to_json(self, indent=None, separators=None, sort_keys=False):
    def remove_callables(x):
      if isinstance(x, dict):
        return {k: remove_callables(v) for k, v in six.iteritems(x)
                if not callable(v)}
      elif isinstance(x, list):
        return [remove_callables(i) for i in x if not callable(i)]
      return x
    return json.dumps(
        remove_callables(self.values()),
        indent=indent,
        separators=separators,
        sort_keys=sort_keys)