Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For that you have the "closed for modification but open for extension" principle.

If the server is new and fresh, yeah it's ok to assume the payload of a request will be a JSON object with some required fields, but leave the parameter there in case someone decides they will start sending XML payloads to it



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: