Differences between json-schema Draft #4 and Draft #5?

844 views
Skip to first unread message

Roger Costello

unread,
Jun 17, 2014, 7:48:22 AM6/17/14
to json-...@googlegroups.com
Hi Folks,

Will json-schema Draft #5 be hugely different from Draft #4?

Or, will there be just a few, small changes?

/Roger

Brandur

unread,
Jun 17, 2014, 3:56:10 PM6/17/14
to json-...@googlegroups.com
https://groups.google.com/d/msg/json-schema/7sC-qXnst8o/uEFh3MhmokoJ
> --
> You received this message because you are subscribed to the Google Groups "JSON Schema" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to json-schema...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Geraint

unread,
Jun 20, 2014, 5:51:33 AM6/20/14
to json-...@googlegroups.com
The list Brandur linked to was aiming to be comprehensive at the time.  Some of those proved controversial, and there have been a few more suggestions as well.  However, there are some features that have been met with general approval.

The current "safe set" (as far as I have seen) is:
  • Multi-lingual meta-data (e.g. title/description could be a map: {"en-us": ...})
  • enumNames (human-readable descriptions for enum values, multi-lingual as above)
  • Allowing extension values for type (restores v3 behaviour - e.g. so someone could create "JavaScript Schema" and include a "function" type)
  • switch (allows cascading if-else clauses)
  • contains (for arrays)
  • More format values, including returning some from v3)
  • Extended templating syntax in links (cleans up templating syntax, while also allowing referencing sub-sub-properties etc.)
  • Templating for rel in links
  • formatMinimum/formatMaximum (format-dependent constraints - useful for e.g. date-time bounds)
Please do not take this as an indication that these are the only features that would make it into v5, or even as a guarantee that these features are certain to make it in.  There might also be discussions/suggestions/criticisms I have missed, so feel free to set me straight.

It's also worth noting that all these proposals are backwards-compatible - that is, all v4 schemas will still work as v5 schemas.

Geraint
Reply all
Reply to author
Forward
0 new messages