Custom serialization of knowledge path