[ https://issues.apache.org/jira/browse/AVRO-1941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15632396#comment-15632396 ]
ASF GitHub Bot commented on AVRO-1941: -------------------------------------- Github user moriarty closed the pull request at: https://github.com/apache/avro/pull/147 > 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: Improvement > 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)