[X3D-Ecosystem] Using prantlf/jsonlint with “X3D” JSON schema; current capabilities
Don Brutzman
don.brutzman at gmail.com
Sun Jan 4 09:30:44 PST 2026
First off, for clarity, there is no official X3D JSON Schema yet.
Next, the X3D Example Archives provide a jsonlint link via jsonlint.com for
each of the models. For instance,
- X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 03
Grouping, Group Animated
- Example for Group node, with animated color for the Sphere
-
https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/GroupAnimatedIndex.html
- " .json
<https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/GroupAnimated.json>
(check
<https://jsonlint.com/?url=https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/GroupAnimated.json>
) " (see blue highlight in image)
-
https://jsonlint.com/?url=https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/GroupAnimated.json
- " JSON is valid! "
[image: image.png]
The build scripts for the example archives also use
- Google Code Archive: jslint4java
- https://code.google.com/archive/p/jslint4java/
- example console output:
C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors/Chapter03Grouping//GroupAnimated.json
> validation checking with jslint
> C:\x3d-code\www.web3d.org\x3d\content\examples\X3dForWebAuthors/Chapter03Grouping//GroupAnimated.json
> validation checking with json-schema-validator
> ... does not support latest JSON Schema, this test is not yet usable
So I think we have good coverage of jsonlint for the examples archive.
Our best description for how to use X3D JSON can be found at
- *X3D to JSON Stylesheet Converter*
- The X3D to JSON stylesheet converts .x3d XML to .json, supporting the
forthcoming JSON Encoding for X3D Graphics.
- https://www.web3d.org/x3d/stylesheets/X3dToJson.html
Next, looking ahead: later this year am expecting we will look at updating
and autogenerating the X3D JSON Schema from X3DUOM using best practices.
Although JSON Schema was never standardized via IETF RFC, usage seems
fairly common these days. This can be an informative annex in upcoming X3D
JSON Encoding ISO/IEC 19776-5:202x specification. Using x3d-public mailing
list, am expecting we will have at least three design patterns to consider:
1. your best effort for JSON schema
2. Altova XMLSpy, XML schema converted to JSON schema
3. Liquid XML, XML schema converted to JSON schema
4. any other design patterns that are offered
It certainly will be interesting to have an X3D JSON draft standard and
some recommendable form of X3D JSON validation available. Thanks for
leading the way in this direction.
Have fun with X3D JSON! 😀
all the best, Don
--
X3D Graphics, Maritime Robotics, Distributed Simulation
Relative Motion Consulting https://RelativeMotion.info
On Sun, Jan 4, 2026 at 6:39 AM John Carlson via X3D-Ecosystem <
x3d-ecosystem at web3d.org> 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
>
> --
> X3D-Ecosystem mailing list
> X3D-Ecosystem at web3d.org
> http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260104/c8897f67/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 118513 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260104/c8897f67/attachment-0001.png>
More information about the X3D-Ecosystem
mailing list