You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Alexander Moriarty (JIRA)" <ji...@apache.org> on 2016/10/25 10:11:59 UTC

[jira] [Created] (AVRO-1941) avrogencpp: unlike java, c++ generated code doesn't include own schema

Alexander Moriarty created AVRO-1941:
----------------------------------------

             Summary: avrogencpp: unlike java, c++ generated code doesn't include own schema
                 Key: AVRO-1941
                 URL: https://issues.apache.org/jira/browse/AVRO-1941
             Project: Avro
          Issue Type: Bug
          Components: c++
    Affects Versions: 1.8.1
            Reporter: Alexander Moriarty


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





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)