[x3d-public] Minutes of JavaScript/JSON meeting 28 July 2021
John Carlson
yottzumm at gmail.com
Mon Jun 28 15:11:30 PDT 2021
2 email images attached for your convenience, Don and others with URL
translation issues. Hopefully I won't exceed email restrictions.
We discussed 3 things:
1. Python JSON Schema generation and validation
Sample script in X3DJSONLD/src/main/python (open project in PyCharm).
Run file generateSchemas.py in PyCharm
Reads X3DUOM specifications from X3DJSONLD/src/specifications
Produces X3DJSONLD/src/main/schema files
Which are copied to x3dschema (below).
X3DJSONLD/src/main/python/validator.py is a python script to validate
X3D JSON in python, which depends on python generated from JSON schema.
2. JSON schema validation in Java and JavaScript is done in the
x3dschema project
Original launch bash script is validate.sh (validates JSON in X3D
resources examples found under /c/x3d-code/.../x3d/content/examples
using javaScript and Java)
downloads jar files to $HOME/.m2/repository
New ant script is build.xml which compiles Java files and validates JSON
in x3d resources examples with Everit 1.12.3. Compatible with draft07 of
json-schema
All schema validation is done with draft07 of json-schema
3. JSON loader for X3DJSAIL
Attached here, and in other emails. JsonLoaderTest.java should be
placed in
./x3d-code/www_web3d_org/x3d/stylesheets/java/tests/org/web3d/x3d/tests/JsonLoaderTest.java
on sourceforge
There are lots of error messages that need to be resolved before
X3DJSAIL will be "good to go" for JSON Loading. These seem to center
around X3DLoadDOM.java from X3DJSAIL, but could be in output from X3DJSAIL
Run the NetBeans project from x3d/stylesheets/java click down through 2
"tests" folders above to where you placed the attached Java file and run
JsonLoaderTest.java
Final files:
./x3d-code/www.web3d.org/x3d/stylesheets/java/examples/JsonLoaderTest.json
./x3d-code/www.web3d.org/x3d/stylesheets/java/examples/JsonLoaderTest.x3d
Intermediate files:
./x3d-code/www.web3d.org/x3d/stylesheets/java/examples/JsonLoaderTestPrettyPrint.intermediate.x3d
(prior to X3DLoaderDOM.java processing)
./x3d-code/www.web3d.org/x3d/stylesheets/java/examples/LoadedJsonConversion.xml
Somewhat useful tools for comparing output, but there are online tools
as well:
X3DJSONLD/src/main/node/xmldiff.js
X3DJSONLD/src/main/node/jsondiff.js
==========================
References:
https://github.com/coderextreme/X3DJSONLD
https://github.com/coderextreme/x3dschema
https://sourceforge.net/p/x3d/code/HEAD/tree/ (for X3DJSAIL, see
X3DJSAIL web page https://www.web3d.org/specifications/java/X3DJSAIL.html)
JSON examples:
https://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.zip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210628/9f557e93/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nholafeflejmbflj.png
Type: image/png
Size: 219014 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210628/9f557e93/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ajkgmoaminmiipcl.png
Type: image/png
Size: 202653 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210628/9f557e93/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: JsonLoaderTest.java
Type: text/x-java
Size: 1190 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20210628/9f557e93/attachment-0001.bin>
More information about the x3d-public
mailing list