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

avrogencpp: unlike java, c++ generated code doesn't include own schema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.8.1
    • None
    • c++
    • None

    Description

      All the classes generated for java include a copy of their schema. The C++ classes do not.

      Every generated java class has getClassSchema().
      Something similar for C++ would be convenient.

      During generation, the schema is available with n->printJson(..) which can then be passed through boost::algorithm::erase_all() to remove whitespace and new lines, and then boost::algorithm::replace_all() to add escape characters back.
      and then given to avro::compileJsonSchemaFromString

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amoriarty Alexander Moriarty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: