6 ms·
See: https://news.ycombinator.com/item?id=10385610 https://news.ycombinator.com/item?id=10385610
by togusa 11y ago
See: https://news.ycombinator.com/item?id=10385610 https://news.ycombinator.com/item?id=10385610
- nadam 11y agoOk, now I see that you are complaining that the JSON Schema language is not strong enough. In this case I think people should create better new schame languages for JSON, as I find that the JSON syntax is better suited to data than XML, which is better suited to marked up text. (maps, arrays and atomic literals are fundamental data concepts, while tags, attributes, free text are closer to mark-up. )
- togusa 11y agoThe thing with XML is it's actually much lower level. There are no types inferred by an XML document. It's literally just chunks of data. JSON defines strings, boolean, maps, arrays, numbers. It's conceptually easier to think about JSON with simple data sets but it's terribly inflexible and you have to think about how things are represented inside strings. A couple of thought exercises on JSON: 1. How do you represent an image inside JSON? 2. How do you represent a reference to another part of the data in JSON (consider a DAG for example)? 3. How do you represent an ordered set or an unordered set in JSON? 4. How do you represent an unsigned value in JSON?
- deleted 11y ago[deleted]