Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-1255

Python schema (message, protocol) to_json names argument should be optional

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.3
    • 1.7.4
    • python

    Description

      The avro.protocol.Protocol, avro.protocol.Message, and various classes in avro.schema all support a to_json method which renders the data in Python generics (easily renderable to json).

      These methods all take a required names argument (of type avro.schema.Names) which stores state representing what types have already been rendered.

      For debugging – and for other uses of the schema – it is helpful if the names argument is optional. When it is not provided, each method should construct an empty schema.Names object internally. to_json thus can be invoked without argument to get the relevant rendering of the current schema in isolation.

      Patch to be attached.

      Attachments

        1. avro-1255.patch
          4 kB
          Jeremy Kahn
        2. avro-1255-b.patch
          4 kB
          Jeremy Kahn

        Activity

          People

            trochee Jeremy Kahn
            trochee Jeremy Kahn
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: