Myntra interview question

Serialize a binary tree to send it as a string.