Add asdict method for key/value pairs