Converting XML Schema (XSD) to Protocol Buffers (Protobuf)

Sometimes one needs to derive a Google Protocol Buffers schema from an XML schema .. e.g. from an Enterprise Architect Export. Tool used here: schema2proto (GitLab project) Steps Download schema2proto-lib from the global Maven repository: https://search.maven.org/search?q=schema2proto Run Schema2Proto against a give XSD schema file and with a given output directory: java -jar schema2proto-lib-1.53.jar Schema2Proto --outputDirectory=src/main/protobuf input.xsd A yaml config file may be given instead of cli parameters: java -jar schema2proto-lib-1.53.jar Schema2Proto ----configFile=config.yaml input.xsd ...

February 2, 2022 · 1 min · 184 words · Micha Kops

Using Apache Avro with Java and Maven

Apache Avro is a serialization framework similar to Google’s Protocol Buffers or Apache Thrift and offering features like rich data structures, a compact binary format, simple integration with dynamic languages and more. In the following short five minute tutorial, we’re going to specify a schema to serialize books in a JSON format, we’re using the Avro Maven plugin to generate the stub classes and finally we’re serializing the data into a single file. ...

March 8, 2014 · 3 min · 573 words · Micha Kops