1 of 31

JSON Schema as a Framework

Part 1: What does it mean to implement "JSON Schema"?

Henry Andrews

August 2022

2 of 31

Part 1 Goals: Understand…

3 of 31

Part 1 Goals: Understand…

  • how and why the question of "conformance" to JSON Schema has become less clear

4 of 31

Part 1 Goals: Understand…

  • how and why the question of "conformance" to JSON Schema has become less clear
  • why implementation of newer functionality has not been automatic or consistent

5 of 31

Part 1 Goals: Understand…

  • how and why the question of "conformance" to JSON Schema has become less clear
  • why implementation of newer functionality has not been automatic or consistent
  • what is needed to encourage broader implementation

6 of 31

Part 1 Goals: Understand…

  • how and why the question of "conformance" to JSON Schema has become less clear
  • why implementation of newer functionality has not been automatic or consistent
  • what is needed to encourage broader implementation
  • how we can move forward without leaving the existing community behind

7 of 31

What does it mean to implement JSON Schema?

8 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?

9 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested

10 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?

11 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?
    • β—’ partially mandatory (βœ“ $vocabulary mechanism, X extension keywords)
    • β—’ partially tested (βœ“ vocabulary presence, X extension keyword)
    • X incompletely specified (in part to gather feedback)

12 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?
    • β—’ partially mandatory (βœ“ $vocabulary mechanism, X extension keywords)
    • β—’ partially tested (βœ“ vocabulary presence, X extension keyword)
    • X incompletely specified (in part to gather feedback)
  • Application extensibility support: can applications leverage information from a schema + instance?

13 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?
    • β—’ partially mandatory (βœ“ $vocabulary mechanism, X extension keywords)
    • β—’ partially tested (βœ“ vocabulary presence, X extension keyword)
    • X incompletely specified (in part to gather feedback)
  • Application extensibility support: can applications leverage information from a schema + instance?
    • ? optional
    • X untested

14 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?
    • β—’ partially mandatory (βœ“ $vocabulary mechanism, X extension keywords)
    • β—’ partially tested (βœ“ vocabulary presence, X extension keyword)
    • X incompletely specified (in part to gather feedback)
  • Application extensibility support: can applications leverage information from a schema + instance?
    • ? optional
    • X untested
  • Usability support: can unexpected outcomes be clearly understood?

15 of 31

What does it mean to implement JSON Schema?

  • Validation behavior support: does this instance conform to this schema, yes/no?
    • βœ“ mandatory
    • βœ“ tested
  • Keyword extensibility support: can I add functionality in a controllable, reliable way?
    • β—’ partially mandatory (βœ“ $vocabulary mechanism, X extension keywords)
    • β—’ partially tested (βœ“ vocabulary presence, X extension keyword)
    • X incompletely specified (in part to gather feedback)
  • Application extensibility support: can applications leverage information from a schema + instance?
    • ? optional
    • X untested
  • Usability support: can unexpected outcomes be clearly understood?
    • ? optional
    • X untested
    • X incompletely specified (in part to gather feedback)

16 of 31

Two different levels of requirement and testing

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

17 of 31

Two different levels of requirement and testing

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

πŸ‘·πŸΎβ€β™€οΈπŸ‘·πŸ»

18 of 31

Two different levels of requirement and testing

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

? ? ?

19 of 31

Two different levels of requirement and testing

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

πŸ§πŸ’°β±οΈ

πŸ§πŸ’°β±οΈ

πŸ§πŸ’°β±οΈ

20 of 31

Two different levels of requirement and testing

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

πŸ§πŸ’°β±οΈ

πŸ§πŸ’°β±οΈ

πŸ§πŸ’°β±οΈ

21 of 31

Two different levels of requirement and testing

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

22 of 31

Perhaps there are two meanings…

JSON Schema Validation (a.k.a. JSON Schema)

  • Validation behavior support
    • βœ“ mandatory
    • βœ“ tested

JSON Schema Framework (JSF)

  • Keyword extensibility support
    • β—’ partially mandatory
    • β—’ partially tested
    • X incompletely specified
  • Application extensibility support
    • ? optional
    • X untested
  • Usability support
    • ? optional
    • X untested
    • X incompletely specified

23 of 31

Perhaps there are two meanings, with different requirements

JSON Schema Validation (a.k.a. JSON Schema)

  • Validation behavior support
    • with the standard vocabularies
    • βœ“ mandatory
  • Keyword extensibility support
    • $vocabulary presence signalling
      • βœ“ mandatory
    • Extension keywords / vocabularies
      • ? optional
  • Application extensibility support
    • ? optional
  • Usability support
    • ? optional

JSON Schema Framework (JSF)

  • Core vocabulary
    • βœ“ mandatory
  • Validation behavior support
    • βœ“ mandatory
  • Keyword extensibility support
    • βœ“ mandatory
  • Application extensibility support
    • βœ“ mandatory
  • Usability support
    • ? optional (maybe mandatory?)

24 of 31

Validation can be implemented in JSF, but doesn't have to be

JSON Schema Validation (a.k.a. JSON Schema)

  • Non-Core Standard Vocabularies
  • JSON Schema Framework (JSF)
    • Core Vocabulary
    • Validation behavior support
    • Keyword extensibility support
    • Application extensibility support
    • Usability support

25 of 31

Two levels of conformance, each under its own name

JSON Schema Validation (a.k.a. JSON Schema)

  • Standard Vocabularies
  • Optionally other features

JSON Schema Framework (JSF)

  • Core Vocabulary
  • Generic extensible functionality
  • Optionally with all standard vocabularies

26 of 31

Two levels of conformance, each under its own name

JSON Schema Validation (a.k.a. JSON Schema)

  • Standard Vocabularies
  • Optionally other features

JSON Schema Framework (JSF)

  • Core Vocabulary
  • Generic extensible functionality
  • Optionally with all standard vocabularies

  • Provides a way to discuss newer features

27 of 31

Two levels of conformance, each under its own name

JSON Schema Validation (a.k.a. JSON Schema)

  • Standard Vocabularies
  • Optionally other features

JSON Schema Framework (JSF)

  • Core Vocabulary
  • Generic extensible functionality
  • Optionally with all standard vocabularies

  • Provides a way to discuss newer features
  • Implementers can choose approach

28 of 31

Two levels of conformance, each under its own name

JSON Schema Validation (a.k.a. JSON Schema)

  • Standard Vocabularies
  • Optionally other features

JSON Schema Framework (JSF)

  • Core Vocabulary
  • Generic extensible functionality
  • Optionally with all standard vocabularies

  • Provides a way to discuss newer features
  • Implementers can choose approach
  • Incremental pathway to JSF

29 of 31

Two levels of conformance, each under its own name

JSON Schema Validation (a.k.a. JSON Schema)

  • Standard Vocabularies
  • Optionally other features

JSON Schema Framework (JSF)

  • Core Vocabulary
  • Generic extensible functionality
  • Optionally with all standard vocabularies

  • Provides a way to discuss newer features
  • Implementers can choose approach
  • Incremental pathway to JSF
  • Assess demand for JSF

30 of 31

Implications

  • Keyword extensibility support is the least-well-specified major area
  • The remaining slide decks in this series of presentations will focus on keyword behaviors
    • Defining our current behaviors is a necessary step to make sure we understand what we have
    • It is not necessarily the ideal way to specify things going forward, however it should help us find the ideal way
  • Before getting into the behaviors, the next slide deck will cover the general processing model
    • This is to set a common baseline understanding as the context for the keyword behaviors.

31 of 31

Up next:

A JSON Schema processing model