3 ms·
Someone here tried it but we quickly gave up on it. - It's ugly and borderline impossible to write by hand because it's JSON. To document something complex you
by galonk 10y ago
Someone here tried it but we quickly gave up on it.
- It's ugly and borderline impossible to write by hand because it's JSON. To document something complex your JSON objects get 20 layers deep and you don't get any decent commenting.
- Because it's so hard to read, it's useless by itself as a guide to how the JSON should be structured.
- Someone would change the code and always forget to update the schema to match. It only makes sense if you're somehow generating the code from the schema.
- amrox 10y ago> - Someone would change the code and always forget to update the schema to match. It only makes sense if you're somehow generating the code from the schema. We used http://www.jsonschema2pojo.org/ http://www.jsonschema2pojo.org/ (via the gradle plugin) on a previous project. I think it worked fairly well.