<div dir="auto">Ferdinand has approved adding an option to disable strict mode in Ajv.</div><div dir="auto"><br></div><div dir="auto">But removing x-orderOf in strict mode revealed many errors for me to fix in “X3D” JSON schema!  Ouch!</div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div style="font-size:inherit"><a href="https://ajv.js.org/keywords.html#define-keyword-with-code-generation-function" style="font-size:inherit">https://ajv.js.org/keywords.html#define-keyword-with-code-generation-function</a></div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">This probably doesn’t apply outside of Ajv and TypeScript, so any efforts in this area calls for a new project!</div><div style="font-size:inherit" dir="auto"><br></div><div style="font-size:inherit" dir="auto">John</div><br></div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Sun, Jan 4, 2026 at 8:38 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-size:inherit"><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">If you use jsonlint to validate JSON, you may get this error:</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><span style="font-size:1rem">echo "{}" | jsonlint -V x3d-4.0-JSONSchema.json -e draft-2020-12</span><br></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">File: <stdin>
Loading the JSON Schema failed:
Compiling the JSON Schema failed.
strict mode: unknown keyword: "x-orderOf"</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">I have just become aware of this.</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">X3dvalidate avoids this by passing { strict: false } to the Ajv2020 constructor.</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">So your choices are use x3dvalidate, modify the schema, or modify jsonlint.</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">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.</code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto">As the x-orderOf is non-functional, I can also remove it.</pre></div><div style="font-size:inherit"><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem"><br></code></pre><pre style="white-space:pre-wrap;color:rgb(49,49,49);font-size:inherit;font-style:normal;font-weight:400;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:1px;text-decoration:none;font-family:monospace" dir="auto"><code style="font-family:monospace;font-size:1rem">John</code></pre></div>
</blockquote></div></div>