00:00:05The purpose of this video is to present some
of the features that were implemented in Oxygen
00:00:11version 25.0 to support the latest JSON schema
versions ... specifically, I'll be demonstrating
00:00:17schemas with version 2020-12. The list of features
include the ability to validate version 2020 JSON
00:00:25schemas according to the specification, the
ability to validate JSON or YAML documents
00:00:31against a 2020 schema, you can edit the schemas
in Oxygen's Design mode, content completion
00:00:39proposals are presented for them, and you can
convert older JSON schema the new versions.
00:00:47I'll start by creating a new version 2020 schema,
00:00:52so I'll find and select JSON Schema
from the new file wizard ... I'll give
00:00:58it a name ... and I need to click customize
and here I can select the 2020 version.The
00:01:09newly created schema is automatically opened in
00:01:12Design mode and notice that the
version is set to 2020-12.
00:01:18Now, the components that can be inserted are
filtered according to the schema version,
00:01:22so note that in the Pallette view, there are
some new components that are available in version
00:01:262020 ... such as: unevaluated properties ...
unevaluated items ... prefix items ... dependent
00:01:37required ... and dependent schemas.
Also note that 'definitions' is now
00:01:43dollar sign defs in the new schema, as
I drag and drop it into my document.
00:01:49Of course, you can also edit the new
schemas in Text mode, and the content
00:01:54completion proposals are based upon the
schema version ... and the proposals include
00:02:00documentation and links to the specification.
Validation is also based upon the schema version.
00:02:06I'll open a sample 2020 schema file. Note that
it contains a "dependentRequired" component.
00:02:14It basically specifies that if a post-office-box
or extended-address property is present,
00:02:19then the street-address must be also present.
00:02:24So, I'll open a sample JSON file that is validated
against that sample schema file I just showed
00:02:30you ... and I'll insert a "post-office-box"
property ... and give it a value.
00:02:37Notice that there's a validation warning saying
that the "street-address" is required.
00:02:42So, I'll insert a "street-address"
property ... and give it a value.
00:02:49and notice that the file is now valid
according to the associated schema.
00:02:55If you are using older JSON schema versions,
you can use Oxygen's Convert JSON Schema tool
00:03:01to convert them to version 2019-09 or
2020-12. So, I have a sample schema file
00:03:09that's version draft-04 ...
I'll go to Tools, JSON tools,
00:03:16and select Convert JSON Schema, I'll
choose my sample file that's version 04,
00:03:25I'll select "Draft 2020-12" for the version,
00:03:29and I'll click "Convert".
I'll split the files so that we
00:03:34can compare them, with the original version 04
schema on top and the converted schema below.
00:03:41Notice that in the converted file, the schema
version is 2020-12 and its dollar sign ID
00:03:47property is listed, as it was converted
from the version 04's id property.
00:03:53Also note that the definitions component
was converted to dollar sign defs ...
00:04:02and it was also converted to
dollar sign defs in references.
00:04:13The dependencies property was converted
to "dependentRequired" since in the new
00:04:18schema versions, dependencies is split into
"dependentRequired" and "dependentSchemas".
00:04:24Also, the items component was
converted into "prefixItems" ...
00:04:31and the additionaItems component
was converted into "items.
00:04:37Some further notes on the conversion details ...
in addition to the conversions I just showed you,
00:04:42if there were any "exclusiveMinimum" or
"exclusiveMaximum" properties with boolean values
00:04:48in the document, they would be removed ... and
any reference that's wrapped into a single-item
00:04:55"allOf" keyword is unwrapped because the 2020
schema allows references to be processed.
00:05:01In addition to the schema converter, other JSON
tools were also updated to provide support for the
00:05:07new JSON schema versions, including the "Generate
Sample JSON Files" tool, the "Generate JSON
00:05:13Schema" tool, the "XSD to JSON Schema" tool, and
the "Generate JSON Schema Documentation" tool. That
00:05:23concludes the demonstration about Oxygen's support
for JSON schema version 2020-12. As always,
00:05:29thanks for watching and we invite you to please
subscribe to our various social media channels.