logoalt Hacker News

rfgplk • today at 8:40 AM • 2 replies • view on HN

[flagged]


Replies

whstl • today at 8:46 AM

This problem definitely exists in C++ or Rust.

The solution in those languages is either to use something like serde validator, garde (for Rust), or go all the way to protobufs... or write your own data validation/parsing by hand.

Rust and C++ don't even have a Javascript deserializer.

oraro • today at 8:43 AM

Agree with you on it being the fault of the ecosystem. But, Zod is pretty good for parsing (rather than validating). It is IMO what makes TS (or should I say Zodscript) very successful