Serialize the whole node.