Re:Rust for Web
by kazagistar on Sunday January 31, 2016 @02:47PM
(#11007713)
Could you show an example of what you mean by "natural looking JSON validation"? I am not sure I have seen what you are referring to.
[ Parent
| on HN ]
I think succint is the word I want. Nested validation logic that looks like the object you are validating.
Unfortunately Play docs are not succint, but you may get the idea from here: https://www.playframework.com/documentation/2.3.x/ScalaJsonC...
I tried to implement similar (typesafe) myself using TypeScript: https://github.com/Ciantic/model-validation there are certain problems I hit with TypeScript, and also I don't want my backend to be JavaScript so I've stopped working on it.