[BZ 1034359] Trait serialization
Merge pull request #292 from sotty/5.6.x

[BZ 1034359] Trait serialization