GPDS is a General Purpose Data Serializer implemented as a very small C++ library. It allows to serialize C++ classes to and from XML/YAML files in a generic format that can be processed by other XML/YAML processing software (or just for the sake of readability).
Consider the following C++ class:
classColor {
public:
std::string name;
int red;
int blue;
int green;
};Most serializers would produce the following output when serializing to XML:
<valuelist>
<valuetype="string">Black</value>
<valuetype="int">0</value>
<valuetype="int">0</value>
<valuetype="int">0</value>
</valuelist>This is not really practical when we want to process the same XML file with other software. GPDS on the other hand produces the following output:
<colorname="Black"format="rgb">
<reddepth="32">0</red>
<greendepth="32">0</green>
<bluedepth="32">0</blue>
</color>GPDS not only supports XML, but also supports YAML:
- color:
"-format": rgb"-name": Blackblue:
"#text": 0"-depth": 32green:
"#text": 0"-depth": 32red:
"#text": 0"-depth": 32