Closed benjagm closed 4 months ago
@jviotti We'd love to get your collaboration for this page. I think it will take 2 hours of your time.
Here are some prominent use cases from my notes:
What do you think? Its a bit of a rough list, and some have a degree of overlap, but we can polish them together
Some of those have a certain degree of overlap or are too specific. Here is a revised list:
Data Validation: The one people know the most about. You can use JSON Schema to validate arbitrary JSON documents in the context of APIs (request/responses), configuration files, or general purpose data modeling like the Genomic Data Commons (https://gdc.cancer.gov/developers/gdc-data-model) in the scientific space
UI Generation: JSON Schema can be used to automatically generate user interfaces that adhere to a given schema. This is very commonly done for generating web forms (like Typeform) or embedded forms within a web app (sign up form?)
Code Generation: Similarly to the UI generation use case, you can generate code out of a JSON Schema. For example, you can generate TypeScript type definitions or even SQL to model your database tables
Documentation: Because schemas serve as the source of truth, you can generate pretty documentation for a data structure using JSON Schema. This commonly done in the context of APIs with OpenAPI, etc, but also in IoT with WoT, and I saw some config file documentation generated in this way too
Data Serialization: Compress JSON data for storage/transmission. For example: https://jsonbinpack.sourcemeta.com
Automated Testing: Good definitions of input/output that schemas provide enable contract and property based testing scenarios. For example: https://schemathesis.readthedocs.io/en/stable/
Schema Inference: This is pretty useful in data science. You may have huge JSON datasets and don't know the structure well. You can use tools that will derive a JSON Schema from the data for you to better understand it and act on it
Semantics Gathering: JSON Schema can produce annotations that augment the given data. This is very convenient in data science too. If you have good schema definitions, combine them with your JSON datasets, add back the annotations, and get back richer data
@benjagm I think a good intro for this page would be a couple paragraphs explaining that JSON is the most popular data format in existence right now, used pretty much across every industry that you can think of. So JSON Schema being the industry-standard schema language for JSON, its applicability is huge.
I like it the second iteration. The use cases need to be inspiring to both developers and business.
@benjagm I think a good intro for this page would be a couple paragraphs explaining that JSON is the most popular data format in existence right now, used pretty much across every industry that you can think of. So JSON Schema being the industry-standard schema language for JSON, its applicability is huge.
Can we get you support for it?
I wrote about this in the book and on my papers. I can prepare a few paragraphs!
It would probably be a good idea to include @awwright's https://github.com/json-schema-org/json-schema-spec/blob/main/jsonschema-use-cases.xml as a source for this. It's the entire purpose of that file.
It would probably be a good idea to include @awwright's https://github.com/json-schema-org/json-schema-spec/blob/main/jsonschema-use-cases.xml as a source for this. It's the entire purpose of that file.
100%!! Thanks for sharing. I wasn't aware of this!
I'll use this and check with Juan an you
That's great. It covers many that I suggested, plus we can augment the list with some more I noted above
I want to take this up. @benjagm
@kwennB I am working on this.
Closed as completed.
Is your feature request related to a problem? Please describe
We have created a new use cases page for our docs but we need to add all the texts with something inspiring.
You can see that page here: https://web-release-3.website-2v2.pages.dev/overview/use-cases
Source: https://github.com/json-schema-org/website/tree/web-release-3/pages/overview/use-cases Data: https://github.com/json-schema-org/website/blob/web-release-3/data/use-cases.json
Branch: https://github.com/json-schema-org/website/tree/web-release-3
Describe the solution you'd like
Compelling use cases
Describe alternatives you've considered
No response
Additional context
No response
Are you working on this?
No