Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

JSON is a serialization format, not a database schema. We went through this exact same thing with XML, also widely supported as a type in relational databases. Some people didn't understand that XML is not a database and went ahead to write all kinds of nonsense around it. JSON is far less rigorous (and far less bloated) than XML, it's closer to a CSV file. It's a great format for a lot of things but it's not a database.

From the Wikipedia article on JSON, right at the top: "JSON (JavaScript Object Notation) is an open standard file format and data interchange format that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and arrays (or other serializable values). It is a common data format with a diverse range of functionality in data interchange including communication of web applications with servers."

Looks like JSON schemas are in the works, so we'll probably go through the whole XML as a database bullshit all over again.



I think you're a little late to the party. JSON Schemas have been a thing for over 10 years now (source: https://datatracker.ietf.org/doc/html/draft-zyp-json-schema-..., see also https://json-schema.org/).


Maybe. The current draft is here:

https://json-schema.org/draft/2020-12/json-schema-core.html

Still a "draft" standard as far as I can tell.

I have never seen this implemented or used but I'm not deep into the JSON world. This looks to me like "XML as a database" all over again, but correct me if it has some other application. There's nothing wrong with XML or JSON schemas, but they are not equivalent to a relational schema -- they are more (properly) used for validation and standardization, i.e. for a data interchange format both sides need to agree on the schema. An interchange format is not a database, it's a representation of things that might be retrieved from or stored in a database.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: