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

If it’s backend only why do JSON shapes need to be continually checked? Can’t you serialize higher level classes or use the database?


Use the database? As in just throw user input straight into the DB without so much as checking its length to make sure it fits? Just let it error out? No sanitization, nothing?


If a JSON shape is maintained by another team, e.g. how can you know they did not change the shape without speaking with them? You could instead validate the schema and log the errors and get notified by the errors and then change your client code. This also means your client code does not need to know about the details of the database.




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

Search: