Add serialize/de.. to primitive trie.