[X3D-Ecosystem] Using prantlf/jsonlint with “X3D” JSON schema

John Carlson yottzumm at gmail.com
Sun Jan 4 07:30:16 PST 2026


Ferdinand has approved adding an option to disable strict mode in Ajv.

But removing x-orderOf in strict mode revealed many errors for me to fix in
“X3D” JSON schema!  Ouch!

There’s also a way to add keywords to Ajv JSON schemas, if people are
interested, so it should be possible to add X3D-like keywords to  JSON
schema, especially for use with Ajv and TypeScript.

https://ajv.js.org/keywords.html#define-keyword-with-code-generation-function

This probably doesn’t apply outside of Ajv and TypeScript, so any efforts
in this area calls for a new project!

John


On Sun, Jan 4, 2026 at 8:38 AM John Carlson <yottzumm at gmail.com> wrote:

> If you use jsonlint to validate JSON, you may get this error:
>
> echo "{}" | jsonlint -V x3d-4.0-JSONSchema.json -e draft-2020-12
>
> File: <stdin>
> Loading the JSON Schema failed:
> Compiling the JSON Schema failed.
> strict mode: unknown keyword: "x-orderOf"
>
>
> I have just become aware of this.
>
>
> X3dvalidate avoids this by passing { strict: false } to the Ajv2020 constructor.
>
>
> So your choices are use x3dvalidate, modify the schema, or modify jsonlint.
>
>
> If someone wants me to do a pull request for jsonlint, I can look into it, but I feel the ajv-formats2019 will need to be added as well.
>
>
> As the x-orderOf is non-functional, I can also remove it.
>
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260104/162be24e/attachment-0001.html>


More information about the X3D-Ecosystem mailing list