Recursive Preorder Python Solution - 20 lines
```\nclass Codec:\n    \n    def serialize(self, root):\n        if not root: return\n        def serializeTree(node):\n            if not node:\n              
```\nclass Codec:\n    \n    def serialize(self, root):\n        if not root: return\n        def serializeTree(node):\n            if not node:\n                return \'null\'\n            return str(node.val) + "," + serializeTree(node.left) + "," + serializeTree(node.right)\n        return serializeTree(root)\n        \n\n    def deserialize(self, data):\n        if not data: return \n        def deserializeTree(a, i):\n            if i >= len(a) or a[i] == \'null\': \n                return [None, i + 1]\n            else:\n                node = TreeNode(a[i])\n                node.left, j = deserializeTree(a, i + 1)\n                node.right, j = deserializeTree(a, j) \n                return [node, j]\n        return deserializeTree(data.split(\',\'), 0)[0]
[]