Add top-level serialization dispatch definitions in CPP.