<div dir="ltr"><a href="https://github.com/coderextreme/x3dschema">https://github.com/coderextreme/x3dschema</a><br><div><br></div><div>Has been updated for JSON validation with X3DJSAIL and JSON schema validation with Ajv.</div><div><br></div><div>I suggest compiling the Java with ant, then running validate.sh with bash.</div><div><br></div><div>Suggestions for a better repository name welcome!</div><div><br></div><div>I have an x3dvalidate repository where you can validate with Ajv/X3D JSON schema from the command line.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 17, 2022 at 9:41 PM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">What I am advocating is replacing X3D JSON schema with X3DJSAIL.  At least for Java.<div><br></div><div>There is already X3DJSONLD.java, which loads JSON into a DOM document.</div><div><br>There is already X3DLoaderDOM.java in X3DJSAIL which loads a DOM document into a X3DJSAIL scenegraph.</div><div><br></div><div>There is already validation built into X3DJSAIL, both DOM and scenegraph.</div><div><br></div><div>The final Java piece is something which ties the above together, which I call Validate.java</div><div><br></div><div>Then you need Ant to run through all the JSON in the X3D example archives (locally).</div><div><br></div><div>The best thing is, we are already in testing with the solution:</div><div><br></div><div><a href="https://github.com/coderextreme/x3dschema" target="_blank">https://github.com/coderextreme/x3dschema</a><br></div><div>=================================================================</div><div>I am not advocating getting rid of X3D JSON schema for JavaScript--yet.   We still need that in the short term until we get a typesafe SAI library for TypeScript or ES 2018+.  Or otherwise leverage DOM structures in X_ITE and X3DOM to do validation.  Another solution is to use a Java extension to Node.js, npm java.</div><div>==================================================================</div><div>I am close on python.  There are two approaches here, one to extend the x3d.py hierarchy or create delegates.  Two, do something like X3DJSONLD, but convert from JSON to python instead of DOM documents.   AFAIK, there is no native XML loader in x3d.py, so normal uppercase X3DJSONLD.an JSON to DOM document converter is not indicated.</div><div><br></div><div>I would appreciate if someone would help on the JSON to python transpiler or JSON loader.</div><div>==================================================================</div><div>The good news is, we now have a way to validate the X3D JSON examples archive with Java, which was holding back X3D JSON, because Java is the preferred language.  So now we have an X3D validator for JSON written in Java!</div><div><br></div><div>So that's why I was so heavily against JSON Schema, because I had to shock people out of SNAFU. Sorry for the heavy handed tactics.</div><div><br></div><div>The Java solution is near, we just need to clear a few things up with the interaction between X3dToJson.xslt, X3DJSONLD.java and X3DJSAIL.  Java developers wanted!</div></div>
</blockquote></div>