Splunk interview question

Serialize and deserialize general binary tree