[x3d-public] JSON Schema meeting minutes

John Carlson yottzumm at gmail.com
Sun Oct 24 22:48:35 PDT 2021


You'll need a SAI library to do fullest verification.   We would have to 
dig deeper in the JSON schema standard to discover any additional 
constraints that can be added.

This is why I spent a lot of time incorporating JSON import into 
X3DJSAIL.  I suggest you bring this up with the X3DJSAIL folks, that you 
want JSON import into X3DJSAIL, x3d.py, etc, I don't think it's imperative.

I have 4000 or so examples already, thanks.   Most of them pass my 
schema, at least with a JavaScript validator. I have reported the ones 
that don't, include the massive failure in the XMLSpy converted schema 
(in python).   We might be able to learn from it.

.x3d files are not described by JSON they are separate encodings.

In the JSON schema, USE and DEF are unrelated, even in XML Schema, I 
would purport.

We really need a good SAI validator, which is present in X3DJSAIL, and 
x3d.py.  This is why I have tried to de-emphasize JSON schema, we have 
good libraries, if we want to add JSON loaders to them.  I do not feel 
that I am capable, and I have appealed for help in constructing es6x3d 
SAI library.

I have spent most of my time supporting X3DJSAIL in Java, Python and 
JavaScript.

There are scripts available that runs through the resources archives and 
applies X3D 4.0 JSON schema to them.

Here is the main script, which you'll have to change if you want to run 
it in a separate folder.  There may be some tweaks with open() that you 
will have to apply on Windows 10.

https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/test.py

On Linux, you can run this from the python folder above, with the command:

nohup python3 test.py 2>&1 > results.txt

I don't totally understand why things broke today, but I have been 
getting it to work today.

Yes, there are problems with the HAnim files.  I have basically not 
reported on many of them.  Would you like me to report to you so you can 
fix them.  I suggest writing a small program which reads in HAnim .x3d 
examples into X3DJSAIL, and validating them. This is already done with 
X3dToJava.xslt, but you have to know how to compile with Java.   So I 
recommend trying X3dToPython.xslt instead.

This repository should help with validating with Ajv:

https://github.com/coderextreme/x3dvalidate

Good luck!

John

On 10/24/21 7:12 PM, Joseph D Williams wrote:
>
> Hi John, Getting this to work will help. Are you looking for examples 
> to validate, beginning with a .x3d file?
>
> If I can include USE in the HanimDisplacer pt. then I can include USE 
> as Interpolator key and value fields(?)
>
> Including a USE in any of the HAnim… nodes Joints, Segments, Sites is 
> not going to work unless, well, I can’t really see how it would work 
> in a ‘standard’ humanoid.
>
> Thanks,
>
> Joe
>
> *From: *John Carlson <mailto:yottzumm at gmail.com>
> *Sent: *Sunday, October 24, 2021 11:44 AM
> *To: *Brutzman, Donald (Don) (CIV) <mailto:brutzman at nps.edu>
> *Cc: *X3D Public Mailing List (x3d-public at web3d.org) 
> <mailto:x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] JSON Schema meeting minutes
>
> Don, schema is here, python seems to be working with added metaschema 
> checks.
>
> https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/schema 
> <https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/schema>
>
> Next on agenda is bpy to JSON conversion, possibly with added GUI/X3D 
> conversion tool.
>
> John
>
> Sent from my iPad
>
>
>
>     On Oct 18, 2021, at 5:09 PM, Brutzman, Donald (Don) (CIV)
>     <brutzman at nps.edu> wrote:
>
>     
>
>     John and I reviewed his latest schema today and discussed various
>     design considerations.
>
>     His latest version, generated by a Python program reading X3DUOM,
>     is found as follows:
>
>       * https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-JSONSchema.json
>
>     Looking at the result in Firefox was helpful because that has a
>     great way to look at JSON which allowed us to iconize/expand
>     (fold/unfold) as needed.  Excerpt follows.
>
>     The result looks great.  One refinement John will handle: for
>     nodes with a USE field, no -children nodes are permitted.
>
>     Once he has the next version, I will check it into the
>     specifications directory (next to X3D XML Schema and XML DOCTYPE).
>
>     At that point we are ready to begin further validation efforts
>     using multivarious tools against the many X3D examples in JSON,
>     such as
>
>       * https://savage.nps.edu/Savage/GroundVehicles/Jeep/Jeep.json
>
>     Testing without regex patterns is good for now.  A prior version
>     had acceptable regex, so that appears to be do-able.
>
>     Having fun with X3D JSON!  8)
>
>     all the best, Don
>
>     -- 
>
>     Don Brutzman  Naval Postgraduate School, Code USW/Br       
>     brutzman at nps.edu
>
>     Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   
>     +1.831.656.2149
>
>     X3D graphics, virtual worlds, navy robotics https://
>     faculty.nps.edu/brutzman
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211025/73745cf8/attachment-0001.html>


More information about the x3d-public mailing list