OpenGATE | News: Working with data

Working with data means working with data formats.
Internet REST APIs deliver their content in different dialects like XML, JSON or YAML. These formats are implemented as part of the GATE framework to parse information without external dependencies.

But another important part is how data is stored and accessed within a program. It is quite common in other projects to have C++ code generators to build classes automatically that embed received data in easy-to-access methods. On the C side such tools are often missing and we need to walk through complex object-trees.

The GATE framework tries to solve this problem with a generic structure description standard that adds rudimental reflection features to plain old C struct types.
Using reflection it is now possible to fill C structures from XML, JSON or YAML from one generic parser.

graph LR; A[XML
JSON
YML] -- Parsing --> B(GATE
Property
Tree); B -- Deserialization --> C[[C struct
C++ class]]; X[[C struct
C++ class]] -- Serialization --> B; B -- Encoding --> Z[XML
JSON
YML];

And what shall we do with the resulting output?

SQLite and ODBC (Windows und Unix) are now part of the framework too to persist content in a performant and standardized kind.