Implement Encodable and Decodable for Node