dwyl / dwyl/learn-json-schema

Why use JSON Schema instead of XYZ (Other) Schema Validator?

Open
#8 0 comments 0 reactions 0 assignees View on GitHub
help wanted question
Dominant language
No language data
Stars
8
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Why _Not_ XYZ (_Alternative_) Schema...?

We _attempted_ to use several "_alternatives_":
+ [schema.org](http://schema.org) - uses micro-formats or HTML "hypermedia"
instead of a more "efficient" data format.
+ [GraphQL Schema](http://graphql.org/learn/schema/) - GraphQL
is _really promising_. We [_used_ GraphQL](https://github.com/dwyl/learn-graphQL)
for our "Inspirational Search" project and _felt_ the pros & cons.
It was _good_ for succinctness, however the schema validation and error debugging (_when something is wrong_) was tedious.
We would often spend _hours_ trying to debug a complex schema without any luck,
and then someone would spot a missing character
(_which was not reported in the error message_) and it would "_magically_" work.
+ [`Joi`](https://github.com/hapijs/joi) - superb for backend (node.js)
validation, concise syntax, however not easy to modularize or extend.
+ XSD (XML Schema Definition) - powerful but way more than what we need and
xml is not ideal for "full-stack" where JSON can be loaded as a
_static_ file in Clients and easily used for client-side validation.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.