<div dir="auto">TL;DR</div><div dir="auto"><br></div><div dir="auto">Understood that you want to pursue a Java course.   Would running JavaScript inside Java be acceptable?   Running against a 4000+ example archive is a challenge, and below is my collected wisdom.</div><div dir="auto"><br></div><div dir="auto">Python solutions for draft2020-12 are as slow as molasses.   I suggest we step backwards to draft07 if we pursue a python solution.   Then we can use the fastjsonschema package.</div><div dir="auto"><br></div><div dir="auto">Ajv is a very fast solution and is my go to solution for JSON schema validation.   It is my most common approach for validating the sourceforge archive and Savage.   Ajv supports most of the draft JSON standards.   Ajv solicits funds for support with my encouragement.  I am just a happy customer!</div><div dir="auto"><br></div><div dir="auto">Draft07 has the advantage of providing many, many implementations across a variety of languages.   We will probably not see that much maturity for many years for any potential upcoming standard.  I thought we had a good Java solution with Everit and Draft07, but you were wary of it.</div><div dir="auto"><br></div><div dir="auto">Thus, my solution for most people would be to allow them to validate one JSON document at a time, probably with python or JavaScript at this point.   I will continue to support the x3dschema and x3dvalidate projects for projects with a lot of files, or even one-offs with x3dvalidate.</div><div dir="auto"><br></div><div dir="auto">I am working to enhance the JSON schema client/server solution, but running Ajv as is done currently on the browser will require running JavaScript interpreter on the client.   If running something like CEF (headless chrome) is acceptable, we can work on that.   But if you’re running Chrome, why not Node.js/V8/Deno?   There are alternatives to npm.   With Deno, security comes by default, and you know which websites you are downloading modules from, pretty much like the web.  Npm is deprecated with Deno.   Deno also supports TypeScript natively.   These take many question marks out of the equation for running TypeScript and JavaScript.</div><div dir="auto"><br></div><div dir="auto">There’s commercial solutions with XMLSpy.   If XMLSpy provided production validators for a license fee less than their editors, that would be greatly appreciated.</div><div dir="auto"><br></div><div dir="auto">I will monitor the jsonschemafriend Java project until it reaches a mature solution for draft2020-12.</div><div dir="auto"><br></div><div dir="auto">It seems like there’s room for a JSON schema to Java compiler in the mix.   I’m not sure why we haven’t seen this?</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 15, 2022 at 10:27 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div class="m_6786380927750843404WordSection1"><p class="MsoNormal">John, I can replace the schema in the official repository, but we still have a severe difficulty in that there is no build process to check it against X3D Examples scenes.  As ever, using Java latest and Ant build tasks will be the path to mainstreaming.  We have been blocked by that for several years, and JSON Schema is still in draft status.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Don’t want to sound discouraging, seems like you are close, but these are the final hurdles to get past.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Recent update found on json schema page indicates that they are still draft and still progressing.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_6786380927750843404MsoListParagraph" style="margin-left:0in"><a href="http://json-schema.org" target="_blank">http://json-schema.org</a><u></u><u></u></li></ul><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u style="font-family:"Courier New""></u> <u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank" style="font-family:"Courier New"">brutzman@nps.edu</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank" style="font-family:"Courier New"">faculty.nps.edu/brutzman</a><u style="font-family:"Courier New""></u><u style="font-family:"Courier New""></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-style:solid none none;border-top-width:1pt;padding:3pt 0in 0in;border-top-color:rgb(225,225,225)"><p class="MsoNormal"><b>From:</b> John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> <br><b>Sent:</b> Wednesday, February 9, 2022 10:43 PM<br><b>To:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Re: [x3d-public] X3D JSON Schema updated for axis++ defaults<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div style="border:1pt solid rgb(0,70,121);padding:2pt"><p class="MsoNormal" style="line-height:12pt;background-color:rgb(0,70,121)"><span style="font-size:10pt;color:yellow">NPS WARNING: *external sender* verify before acting.<u></u><u></u></span></p></div></div></div><div lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word"><div class="m_6786380927750843404WordSection1"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">See attached JSON schema to get #comment next to USE (practically everywhere in the schema).  Shortened versions of the schema welcome.  I'm not quite sure what to do. <u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">This adds about 3660 lines to the schema.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">If you can suggest a better JSON encoding or X3D JSON schema, that would be welcome at this point.<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Feb 10, 2022 at 12:29 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal">Please confirm that you want me to accept @USE with sibling -children fields, as shown in recently mentioned Trebuchet.json.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">See below snippet of X3D JSON schema, that I will add back in *many* places.  The code to be added is embolden.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks!<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Sat, Feb 5, 2022 at 9:06 AM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in;border-left-color:rgb(204,204,204)"><div><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:12pt">2. Saw a documentation problem:  USE nodes can’t indicate anything besides the @USE value (except for containerField value for relevant parent-child relationship in XML encoding).  So your following guidance about comments is not portable outside of JSON.<u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">    "RigidBody": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">      "type": "object",</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">      "oneOf": [</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">        {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "type": "object",</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "properties": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@class": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "string"</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            },</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@USE": {</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "string"</span><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">            },</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">            "-children": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "type": "array",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "minItems": 1,</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">              "items": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "type": "object",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "properties": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                  "#comment": {</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                    "type": "string",</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                    "$comment": "#comment statements are the only allowed in -children node when using a USE field"</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                  }</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                },</span></b><u></u><u></u></p><p class="MsoNormal"><b><span style="font-size:10pt;font-family:"Courier New";color:black">                "additionalProperties": false</span></b><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">              }</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            }</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">         },</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "required": [</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">            "@USE"</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          ],</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">          "additionalProperties": false</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New";color:black">        },</span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><p class="MsoNormal">_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><u></u><u></u></p></blockquote></div></div></blockquote></div></div></div></div></blockquote></div></div>