There is no standard way to represent data structures of this kind.
One approach could be to sequentially write the content of every node during a preorderinorder traversal, together with information aboud the tree structure.
I guess (this needs to be checked) that two bits indicating if a node has left and right children is enough to reconstruct correctly while reading back.
Note that it some applications, you needn't keep the original tree structure but only the content: for instance for a balanced search tree, you can just build a new tree from the keys.