4 ms·
Json is not popular because it saves bits but because it's easily readable and maps 1:1 with js objects. I've worked with xml and xslt and while I see the advan
by kungato 6y ago
Json is not popular because it saves bits but because it's easily readable and maps 1:1 with js objects. I've worked with xml and xslt and while I see the advantages I still prefer json for anything. Your validation should come from annotated objects on the backend anyways which should be a single source of truth and then it doesn't matter which markup format you are validating
- ilovetux 6y agoI can kind of see what you're saying, but what does "annotated objects on the backend" mean. If there is not a standard I can only hack a solution together. I cannot ensure anything with 100% certainty, instead I'm left guessing if my logic is correct. With a standard, however, I can be sure that what I intend is being validated and if my logic is wrong then I can change it to match the spec.
- dsego 6y agoJson schema maybe http://json-schema.org/ http://json-schema.org/