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

John Carlson yottzumm at gmail.com
Sun Jan 4 10:39:16 PST 2026


I would love to contribute to the JSON standard now that I am a member
again.  I just don’t know about my wordsmithing skills, so people will have
to improve what I write.

The feature I am showing in @prantlf/jsonlint is the ability to use JSON
schema.  Other jsonlint’s I am aware of do not use JSON schema, so they are
simply like JSON.parse() in JavaScript with error reporting.   What this
means is if you have a node that isn’t an X3D node in JSON, no error will
be reported, possibly leading to constructors that weren’t meant to be
called, like Function, to name a potentially dangerous one.  Recent code
related to Maya was revealed to access globals() to construct a class.

This is why JSON Schema, XML schema (on JSON), a factory pattern, a set of
node names to check against, an API like X_ITE, X3DOM, X3DJSAIL or Castle
is of upmost concern, in mildly conservative cases.  APIs can have a wide
variety of treatment, with eval being common in some, it’s not wise to just
use a linter.

I welcome Altova XMLSpy and Liquid XML.  OxygenXML might be another.  Some
have more means than others.   XML schema can be employed for those who
can’t afford a commercial schema and don’t want to use my JSON schema.   I
recommend web3d invest in the XML schema solution for JSON documents before
proceeding with JSON Schema, realizing JSON schema has things that XML
schema doesn’t and vica versa.  I have also investigated other XML schema
to JSON schema solutions, and X3D JSON appears to be a special case.

There’s no problem with just typing constructors hardcoded in your Java
code, that’s validated by the compiler/interpreter.  The problem is
treating data like code.

Thanks,

John

On Sun, Jan 4, 2026 at 11:30 AM Don Brutzman <don.brutzman at gmail.com> wrote:

> 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/a81179f7/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/a81179f7/attachment-0001.png>


More information about the X3D-Ecosystem mailing list