def to_json(self, names=None):
    if names is None:
      names = Names()
    # Request records don't have names
    if self.type == 'request':
      return [ f.to_json(names) for f in self.fields ]

    if self.fullname in names.names:
      return self.name_ref(names)
    else:
      names.names[self.fullname] = self

    to_dump = names.prune_namespace(self.props.copy())
    to_dump['fields'] = [ f.to_json(names) for f in self.fields ]
    return to_dump
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/avro-1.7.6/src/avro/schema.py/RecordSchema.to_json/original