[x3d-public] Improve X3D JSON schema?
Don Brutzman
don.brutzman at gmail.com
Thu Feb 19 10:47:46 PST 2026
Once again: "Later this spring we will be looking carefully at several
potential JSON schema designs for X3D." This is not an activity that I can
support at the present time.
all the best, Don
--
X3D Graphics, Maritime Robotics, Distributed Simulation
Relative Motion Consulting https://RelativeMotion.info
On Thu, Feb 19, 2026 at 10:18 AM John Carlson <yottzumm at gmail.com> wrote:
> Great, Don,
>
> Here's a set of subschema's I've arrived at for @geoSchema, note that this
> is very different from Roy's version, and has been updated for latest JSON
> schema standards. If this can be auto-generated from X3DUOM, great! Maybe
> an array of patterns? Note that I need to look at online test cases. I'll
> be looking at converting the archive with X3dToJson.xslt or Holger's
> x3d-tidy, unless you;'ve got a set of JSON files handy? Thanks!
>
> For example, this command seems to present some errors I have no clue
> about. I am pursuing validating my schema (in strict mode) for more
> details.
>
> $ jsonlint --validate schemas/x3d-4.1-JSONSchema.json --environment
> draft-2020-12 examples/abox.json 1>/dev/null
> strict mode: "prefixItems" is 1-tuple, but minItems or maxItems/items are
> not specified or different at path "#"
> strict mode: "prefixItems" is 2-tuple, but minItems or maxItems/items are
> not specified or different at path "#"
>
> I'm hoping someone in the geospatial group can review this.
>
> "@geoSystem": {
> "$comment": "Coordinate reference system identifier tokens. Exactly
> one of three systems: GD/GDC (geographic degrees), UTM (universal
> transverse mercator), or GC/GCC (geocentric).",
> "oneOf": [
> {
> "$ref": "#/$defs/@geoSystem-GD"
> },
> {
> "$ref": "#/$defs/@geoSystem-UTM"
> },
> {
> "$ref": "#/$defs/@geoSystem-GC"
> }
> ]
> },
> "@geoSystem-GD": {
> "title": "geoSystem GD/GDC Geographic Degrees",
> "$comment": "Geographic lat/lon degrees. Optional second token
> selects ellipsoid datum; defaults to WE (WGS84 ellipsoid).",
> "type": "array",
> "minItems": 1,
> "maxItems": 2,
> "prefixItems": [
> {
> "type": "string",
> "enum": [
> "GD",
> "GDC"
> ],
> "default": "GD"
> }
> ],
> "items": {
> "$ref": "#/$defs/@geoSystem-ellipsoid"
> }
> },
> "@geoSystem-UTM": {
> "type": "array",
> "minItems": 2,
> "maxItems": 5,
> "prefixItems": [
> {
> "type": "string",
> "const": "UTM"
> },
> {
> "$ref": "#/$defs/@geoSystem-UTM-zone"
> }
> ],
> "items": {
> "type": "string",
> "enum": [
> "N",
> "S",
> "WGS84",
> "AM",
> "AN",
> "BN",
> "BR",
> "CC",
> "CD",
> "EA",
> "EB",
> "EC",
> "ED",
> "EE",
> "EF",
> "FA",
> "HE",
> "HO",
> "ID",
> "IN",
> "KA",
> "RF",
> "SA",
> "WD",
> "WE"
> ]
> },
> "if": {
> "contains": {
> "const": "N"
> }
> },
> "then": {
> "not": {
> "contains": {
> "const": "S"
> }
> }
> }
> },
> "@geoSystem-GC": {
> "title": "geoSystem GC/GCC Geocentric",
> "$comment": "Earth-centered geocentric coordinate system. No
> additional parameters.",
> "type": "array",
> "minItems": 1,
> "maxItems": 1,
> "prefixItems": [
> {
> "type": "string",
> "enum": [
> "GC",
> "GCC"
> ]
> }
> ],
> "items": false
> },
> "@geoSystem-ellipsoid": {
> "title": "geoSystem ellipsoid datum",
> "$comment": "Reference ellipsoid. WGS84 is the datum name; the 22
> two-letter codes are ellipsoid identifiers. Defaults to WE.",
> "type": "string",
> "default": "WE",
> "enum": [
> "WGS84",
> "AM",
> "AN",
> "BN",
> "BR",
> "CC",
> "CD",
> "EA",
> "EB",
> "EC",
> "ED",
> "EE",
> "EF",
> "FA",
> "HE",
> "HO",
> "ID",
> "IN",
> "KA",
> "RF",
> "SA",
> "WD",
> "WE"
> ]
> },
> "@geoSystem-UTM-zone": {
> "title": "UTM zone number",
> "$comment": "Zone 1 60 prefixed with Z. Leading zero is optional: Z1
> and Z01 are both valid.",
> "type": "string",
> "pattern": "^Z(0?[1-9]|[1-5][0-9]|60)$"
> },
>
>
> On Thu, Feb 19, 2026 at 11:31 AM Don Brutzman <don.brutzman at gmail.com>
> wrote:
>
>> John, to be clear, please note that you are referring to your JSON
>> Schema. Any trial improvements you make will be welcome. Thanks for
>> steady efforts.
>>
>> As reported many times before, we do not have an official X3D JSON
>> schema. Later this spring we will be looking carefully at several
>> potential JSON schema designs for X3D. While reaching consensus regarding
>> best patterns, am expecting the group will evaluate implementations based
>> on autogeneration of an exactly correct version using X3DUOM. Summary
>> online at
>>
>> - X3D to JSON Stylesheet Converter
>> The X3D to JSON stylesheet converts .x3d XML to .json, supporting the
>> forthcoming JSON Encoding for X3D Graphics.
>> This page fully describes current X3D JSON design patterns and
>> syntax, providing examples and references.
>> - https://www.web3d.org/x3d/stylesheets/X3dToJson.html
>>
>> Planned Progress
>>
>> Current status: X3D JSON developmental work is mature and provides full
>> coverage of X3D model capabilities in JSON, as demonstrated by thousands
>> of example models
>> <https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples>.
>> Design patterns have been available and assessed by X3D community for
>> several years. One possible addition to be considered will be use of an
>> .x3dj file extension as an alternative to the classic .json file
>> extension.
>>
>> The only significant gap in current assets is availability of a JSON
>> Schema for X3D, autogenerated from the X3D Unified Object Model (X3DUOM)
>> <https://www.web3d.org/specifications/X3DUOM.html>. Web3D Consortium
>> standardization efforts have been quite careful about taking this step.
>> Although JSON Schema design <https://json-schema.org/> has not been
>> formally ratified or standardized, it appears to be sufficiently well
>> defined and implemented to justify creating an X3D JSON Schema as an
>> informative annex in the upcoming draft specification for the X3D JSON
>> Encoding. We expect such work to occur in Spring 2026.
>>
>> We have much capability in X3D JSON already. Adding a shared and
>> standardized X3D JSON Schema will be an excellent next step.
>>
>> Onward we go. Have fun with X3D JSON! 😃
>>
>> all the best, Don
>> --
>> X3D Graphics, Maritime Robotics, Distributed Simulation
>> Relative Motion Consulting https://RelativeMotion.info
>>
>>
>> On Thu, Feb 19, 2026 at 2:33 AM John Carlson via x3d-public <
>> x3d-public at web3d.org> 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
>>> _______________________________________________
>>> x3d-public mailing list
>>> x3d-public at web3d.org
>>> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20260219/d578bb35/attachment-0001.html>
More information about the x3d-public
mailing list