In C++ world there are a lot of tasks that require a big amount of boilerplat code: serialization, RPC, ORM, bindings for script languages. There are multiple approaches that simplify development of such kind of code, i.e. for serialization: write everything manually, put everything into macro, rely on Hana-based templates, combine one with another. But there's one approach that can replace all others: codegeneration.
json, bson, xml, yaml, protobuf - there's a bunch of formats you can save your data in. Each format has its own library and not only one. Each library suggests their own way of data description and some of them even suggest a whole infrastructure which you have to adapt to and adapt your code to. This is not always convenient, you want freedom. You want your source code not to depend on a way serialization goes. Modern means of codegeneration may give you this freedom, you only need to know ho to apply them.