[x3d-public] Improve X3D JSON schema?

John Carlson yottzumm at gmail.com
Thu Feb 19 06:42:14 PST 2026


Claude.ai is recommending this change to X3D JSON schema on the grounds
that it's more validateable.  I'm not sure if it works yet.  Colors must be
in tuples of 3.  I know I was originally against this, but it does make
sense from a validation point of view.

Essentially, it's an array of arrays.

My argument was that a single array was more inline with the rest of the
X3D encodings, but perhaps not SAI?

WebGL uses TypedArrays.

"@groundColor": {
"description": "MFColor inputOutput",
"type": "array",
"items": {
              "type": "array",
              "minItems": 3,
              "maxItems": 3,
              "items": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
               }
}
}

On Thu, Feb 19, 2026 at 4:32 AM John Carlson <yottzumm at gmail.com> wrote:

> I'm looking for someone to work on JSON schemas, particularly, improving
> X3D JSON schema.
>
> While the X3D JSON schema works in non-strict mode (for JSON schema
> draft2020-12), it doesn't work in strict mode.  While I have been
> successful at removing some of these stumbling blocks, I need help with
> some, particular understanding how properties like prefixItems, items,
> minItems and maxItems work with arrays, and with oneOf.
>
> Knowledge of JavaScript is helpful, and I'd like to work on the @geoSystem
> field to work in strict mode, yet still offer the same validation
> capabilities (or better).  Knowledge of coordinate systems like UTM, GD,
> WGS84 might be helpful.  But it's more important to know about enumerations
> and arrays of strings.
>
> Here's my development environment:
>
> https://github.com/coderextreme/x3dvalidate
>
> Once you have the project checked out, you can test with:
>
> C:\> node.exe index.js examples\abox.json
>
> (or node, or nodejs)
>
> The schemas are in the schemas folder.  Here's the one that needs
> work:  schemas\x3d-4.1-JSONSchema.json  Let's just get this one schema
> working for now.
>
> Once the schema has been prepared, I will work on getting the
> auto-generation working for strictly complying schemas (I've already been
> working on that).
>
> There may either be updates to X3D JSON schema, or we may request
> enhancements to the JSON schema standard for our use case.  Possibly,
> enhancements to Ajv may be needed.
>
> The work will involve validating the X3D JSON schema over and over again
> as the schema is improved, validating the X3D JSON schema itself.
>
> While I'm not a business, there might be other ways to renumerate you.
> Kind of like working for someone to work your house, I guess?
>
> I guess I'll try to get AI to make suggestions next.
>
> Thanks,
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260219/28b0b10c/attachment-0001.html>


More information about the x3d-public mailing list