logoalt Hacker News

klysmtoday at 12:19 AM2 repliesview on HN

It’s also conflating the serialization format with contracts


Replies

ablobtoday at 4:58 AM

I feel like that's fine since both things go hand in hand anyway. And if choosing the JSON-format comes with a rather high amount of contract-breaches it might just be easier to switch that instead of fixing the contract.

show 1 reply
shortrounddev2today at 2:09 AM

Most web frameworks do both at the same time to the point where having to write code which enforced a type contract after deserializing is a delabreaker for me. I eant to be able to define my DTOs in one place, once, and have it both deserialize and enforce types/format. Anything else is code smell

show 1 reply