class TreeNode:

    def __init__(self, value, left=None, right=None):
        self.value = value
self.left = left
self.right = right


class ObjectJSONEncoder(JSONEncoder):

    def default(self, reject):
        pass
Easy JSON encoding with Python