[x3d-public] IMPORT-ANT: X3D JSON schema--desupporting hand-generated schema, X3DJSAIL adoption of X3DJSONLD.java to load JSON (with a caveat)

John Carlson yottzumm at gmail.com
Fri Apr 9 03:13:47 PDT 2021


This document got a little longer than I was aiming for.  My apologies!

Just to let you know, we are de-supporting the hand-generated X3D JSON 
schema, now known as version 4.0H, previously known as 6.0. When forced 
to make a choice, I chose the auto-generated one.

We will be adopting the auto-generated X3D JSON schema, previously known 
a 3.4, but for a long time known as 4.0.

/_*One major change we've noticed and adopted is the child of IMPORT is 
an object, not an array.  X3dToJson.xslt was changed for this a LONG 
time ago, I'm talking 3 years.  I don't think this will affect X3DJSONLD.*_/

There's some things to know about running the auto-generated schema 
under X3DJSONLD and the X3DJSONLD validator (not the popular X3D 
validator).   Sometimes it's best to look for the "deepest" error 
first.   This is due to Ajv not preventing errors from "bubbling up" 
from "lower" levels.  No, Ajv won't be changed, that I know of.  If you 
don't like it, perhaps another JSON schema validator is possible?

I don't believe that X3DJSONLD (the repository) will be changed much.  
We will be adding comments to the newly crowned X3D JSON schema for X3D 
types and perhaps accessType.  We think we will see auto-generation 
moving from a python code base to a XSL code base. The most up-to-date 
schemas should first appear under 
https://github.com/coderextreme/X3DJSONLD/src/main/schema (but the 6.0 
is actually somewhere between 3.3 and 4.0H--Don't use it). and we will 
choose a location for the XSL generated schemas once development is 
underway.   The schemas in use by X3DJSONLD are:

x3d-3.0-JSONSchema.json
x3d-3.1-JSONSchema.json
x3d-3.2-JSONSchema.json
x3d-3.3-JSONSchema.json
x3d-4.0-JSONSchema.json

Note, since the X3D JSON schemas are based on the X3D Unified Object 
Model, you should see updates to the X3D JSON schema soon after the 
X3DUOM.  If you don't, let me know!  The best way to contact me would 
probably be through github issues, but that hasn't been tested yet, and 
it still goes to my email.

If anyone is running X3D JSON with a more recent JSON schema than 
draft-07, let yourself be known!  We can at least kibbitz, if not share 
code.

================================================================================================================================================

If someone is using X3D JSON, let yourself be known!  It's available in 
X3DJSONLD, X3DOM and X_ITE, and should be officially renamed and adopted 
in X3DJSAIL as a JSON loader (It should already be there under 
net.coderextreme.X3DJSONLD).  There are still some kinks to be worked 
out in the Java version (no one actually has been the identified at the 
culprit yet), as previously discussed on list.  Compile/Run 
net/coderextreme/JsonConversion.java and compare to originals.  An 
intermediate, directly after X3DJSONLD runs, XML DOM is printed to 
standard output, then the DOM document is loaded into X3DJSAIL for 
conversion to XML and JSON.

If you're interested in running the validator in a JS environment or 
from the command-line, check out https://github.com/coderextreme/x3dvalidate

Have fun with X3D JSON!

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210409/45425c32/attachment-0001.html>


More information about the x3d-public mailing list