<div dir="auto"> No.   JSON doesn’t have syntactic comments.</div><div dir="auto"><br></div><div dir="auto">You must do something like:</div><div dir="auto"><br></div><div dir="auto">“-children”: [ {“#comment”: “does this” } ]</div><div dir="auto"><br></div><div dir="auto">Or potentially, my preference:</div><div dir="auto"><br></div><div dir="auto">“#comment”: [ “does this” ]</div><div dir="auto"><br></div><div dir="auto">What do you think?   I think mine clearly distinguishes comments from fields.   Comments become more like MFStrings.</div><div dir="auto"><br></div><div dir="auto">The difference is we can’t apparently put a comment in a -children field.</div><div dir="auto"><br></div><div dir="auto">Why can’t we accept either technique?</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 10, 2022 at 5:50 PM Joseph D Williams <<a href="mailto:joedwil@earthlink.net">joedwil@earthlink.net</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="#954F72" style="word-wrap:break-word"><div class="m_4865052304914668781WordSection1"><ul style="margin-top:0in" type="disc"><li class="m_4865052304914668781MsoListParagraph" style="margin-left:0in">have  one technique for adding #comment in JSON.  </li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Right, json same as classic: <u></u><u></u></p><p class="MsoNormal">…<u></u><u></u></p><p class="MsoNormal">4 5 6  # does this<u></u><u></u></p><p class="MsoNormal">… <u></u><u></u></p><p class="MsoNormal"> I general, any # stuff ends line. This is fine for classic and json? <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">For xml, should be able to put something maybe <! … />  in attr between sf in an mF to end line. <u></u><u></u></p><p class="MsoNormal">I know that looks hard to do because how do you tell the xml attr that it is there, embedded in the attr data that is expected to be nice and clean, but it would be worth it to accommodate more convenient comments for sfs in mfs provided by classic and json forms. <u></u><u></u></p><p class="MsoNormal">Thanks and Best, <u></u><u></u></p><p class="MsoNormal">Joe<u></u><u></u></p></div></div><div lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word"><div class="m_4865052304914668781WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><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" style="border:none;padding:0in"><b>From: </b><a href="mailto:yottzumm@gmail.com" target="_blank">John Carlson</a><br><b>Sent: </b>Thursday, February 10, 2022 2:20 PM<br><b>To: </b><a href="mailto:joedwil@earthlink.net" target="_blank">Joseph D Williams</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] X3D JSON Schema - validating comments inside a USEnode</p></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Good points, Joe.  This particular issue was trying to limit the fields that go along with a @USE field in JSON. One camp was thinking there should only be a @class field along with @USE, and another was saying we also needed    #comment with a -children field.   We may choose another way of adding comments, I’m not opposed to that, and I favor that, if we can get everyone to agree.  Otherwise we only have  one technique for adding #comment in JSON.   That may be limiting us.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I’ve pretty much always advocated a more XML-like approach for JSON, but there was a desire to make JSON look like VRML, I guess.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I’m hoping we can discover some kind of sharing mechanism in JSON schema to reduce heavy duplication.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Anyway, here we are.</p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">John</p></div><div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">On Thu, Feb 10, 2022 at 3:36 PM Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>> wrote:</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><ul type="disc"><li class="m_4865052304914668781m674002114881167819msolistparagraph">In general we want to be able to “round trip” convert between any of the X3D encodings without loss of X3D scene information, including comments.</li></ul><p class="MsoNormal"> </p><p class="MsoNormal">This really shows when, like I did for the kicker, it helped to set a comment to identify each coordinate point of the skin shape. The objective was to keep track of point index in order of appearance according to names assigned to standard surface features. At the first transcoding from classic to xml those comments were transported into a big comment at the end of the xml. Then when back to classic, of course those comments remained basically disassociated from the individual point that was intended to be documented. </p><p class="MsoNormal">I sort of knew what was going to happen because when the mf points field becomes an attr, it don’t like to find embedded comments. The xml mf field only contains sfs to make mfs and needs comment childs or meta childs, while the classic mf can have a comment for each individual sf in the mf list. So I didn’t compensate using a different style of comments and so the reference became basically useless unless the transform rules are known. </p><p class="MsoNormal"> </p><p class="MsoNormal">What has changed since we chose our sf and mf xmlization path? Well for one thing it ought to be a lot easier to just say Hey if we wanna put comments for each sf in the mf list, then OK Thus it will be ok to comment an sf in an mf with end of line comment for the mf numeric lists.  </p><p class="MsoNormal"> </p><p class="MsoNormal">Same with the json/gltF encodings, embedded comment to document an sf in the mf should be ok, and directly transcodable from xml or json or gltf to classic.  </p><p class="MsoNormal"> </p><p class="MsoNormal">Thanks, </p><p class="MsoNormal">Joe</p></div></div><div><div><p class="MsoNormal"> </p><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><a href="mailto:brutzman@nps.edu" target="_blank">Brutzman, Donald (Don) (CIV)</a><br><b>Sent: </b>Wednesday, February 9, 2022 9:01 PM<br><b>To: </b><a href="mailto:yottzumm@gmail.com" target="_blank">John Carlson</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] X3D JSON Schema - validating comments inside a USEnode</p></div><p class="MsoNormal"> </p><p class="MsoNormal">[Adjusted subject line to match topic] Hello again John, thanks for further detail.</p><p class="MsoNormal"> </p><p class="MsoNormal">The following is valid XML:</p><p class="MsoNormal"> </p><p class="MsoNormal">            <Shape USE='Torus'><br>              <!-- Knot --><br>            </Shape></p><p class="MsoNormal"> </p><p class="MsoNormal">As is the following VRML fragment, if found in the right place:</p><p class="MsoNormal"> </p><p class="MsoNormal" style="text-indent:0.5in">USE Torus # Knot</p><p class="MsoNormal"> </p><p class="MsoNormal">Certainly the most common place to find comments in practice will be as children within a grouping node, or at the top of a scene.  So it is clearly an important use case to support.</p><p class="MsoNormal"> </p><p class="MsoNormal">In general we want to be able to “round trip” convert between any of the X3D encodings without loss of X3D scene information, including comments.</p><p class="MsoNormal"> </p><p class="MsoNormal">So if your JSON schema is not validating such comments, may I recommend that you add such support.  Good luck!</p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""> </span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- </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></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</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></span></p><p class="MsoNormal"> </p><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> x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> <b>On Behalf Of </b>John Carlson<br><b>Sent:</b> Wednesday, February 9, 2022 8:02 PM<br><b>To:</b> 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 (regression failure)</p></div><p class="MsoNormal"> </p><div><div><p class="MsoNormal">Report on JSON file generated by X3dToJson.xslt, download from  <a href="https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/TrebuchetIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/TrebuchetIndex.html</a></p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Note that the JSON linked file (on the above linked page) is essentially identical to the  February 9th version, except for the date.</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">X3dToJson.xslt needs to be updated to not produce comments inside -children fields at the same level as @USE field.  There should be NO -children fields at the same level as @USE in X3DJSON</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">I believe this is the JSON in question.  Note @USE and -children at the same level.</p></div><div><p class="MsoNormal">==</p></div><div><p class="MsoNormal"> { "Shape":<br>                                    {<br>                                      "@USE":"Torus",<br>                                      "-children":[<br>                                        {<br>                                          "#comment":"Knot"<br>                                        }<br>                                      ]<br>                                    }</p></div><div><p class="MsoNormal">==</p></div><div><p class="MsoNormal">This appears to be the problematic XML, but double check me please (there are two Knot comments).</p></div><div><p class="MsoNormal">            <Shape USE='Torus'><br>              <!-- Knot --><br>            </Shape></p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">==</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Please suggest an alternate JSON encoding of this XML</p></div><div><p class="MsoNormal"><br>Updated JSON schema (with Bounded Object updates) available at normal locations (see messages included).</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">Thanks!</p></div><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">John</p><div><p class="MsoNormal"> </p></div><div><p class="MsoNormal">$ node x3dvalidate.js Trebuchet.json<br>Can only validate version 4.0 presently. Switching version to 4.0.<br>Loading schema<br>Parsing schema<br>Adding schema<br>Schema 4.0 added<br>Schema 4.0 compiled<br>================================================================================<br>File: Trebuchet.json<br>Error reading Trebuchet.json<br> keyword: required<br> instancePath: /X3D/Scene/-children/8/Transform<br> message: must have required property @USE<br> params: {"missingProperty":"@USE"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: required<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform<br> message: must have required property @USE<br> params: {"missingProperty":"@USE"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: required<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform<br> message: must have required property @USE<br> params: {"missingProperty":"@USE"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: required<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform/-children/0/Transform<br> message: must have required property @USE<br> params: {"missingProperty":"@USE"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: additionalProperties<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform/-children/0/Transform/-child<br>ren/0/Shape<br> message: must NOT have additional properties<br> params: {"additionalProperty":"-children"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: additionalProperties<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform/-children/0/Transform/-child<br>ren/0/Shape<br> message: must NOT have additional properties<br> params: {"additionalProperty":"@USE"}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform/-children/0/Transform/-child<br>ren/0/Shape<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform/-children/0/Transform<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform/-children/4/Transform<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/8/Transform/-children/8/Transform<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: Trebuchet.json<br> version: 3.0<br><br> keyword: oneOf<br> instancePath: /X3D/Scene/-children/8/Transform<br> message: must match exactly one schema in "oneOf"<br> params: {"passingSchemas":null}<br> file: Trebuchet.json<br> version: 3.0</p></div></div></div><p class="MsoNormal"> </p><div><div><p class="MsoNormal">On Mon, Feb 7, 2022 at 11:12 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><p class="MsoNormal" style="margin-left:4.8pt">New fetchable X3D V4.0 JSON Schema fetchable from:</p><div><p class="MsoNormal" style="margin-left:4.8pt"> </p></div><div><p class="MsoNormal" style="margin-left:4.8pt"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcoderextreme%2FX3DJSONLD%2Fblob%2Fmaster%2Fsrc%2Fmain%2Fschema%2Fx3d-4.0-JSONSchema.json&data=04%7C01%7Cbrutzman%40nps.edu%7Cbd4c3b3b4b9c480a478708d9ec4a3731%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637800626508897471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9BFtdH4oQ3m2rgQFhZLZIykqyJx29cTQBstsYI68gUM%3D&reserved=0" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-4.0-JSONSchema.json</a></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> </p></div><div><p class="MsoNormal" style="margin-left:4.8pt">Includes changes to title...word ordering and date time (now being the time generated.</p></div></div><p class="MsoNormal" style="margin-left:4.8pt"> </p><div><div><p class="MsoNormal" style="margin-left:4.8pt">On Thu, Jan 27, 2022 at 2:55 PM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:</p></div><blockquote style="border-style:none none none solid;border-left-width:1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt;border-left-color:rgb(204,204,204)"><div><p class="MsoNormal" style="margin-left:9.6pt">You may now grab new versions of X3D JSON schema:</p><div><p class="MsoNormal" style="margin-left:9.6pt"> </p></div><div><p class="MsoNormal" style="margin-left:9.6pt"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcoderextreme%2FX3DJSONLD%2Fblob%2Fmaster%2Fsrc%2Fmain%2Fschema%2Fx3d-4.0-JSONSchema.json&data=04%7C01%7Cbrutzman%40nps.edu%7Cbd4c3b3b4b9c480a478708d9ec4a3731%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637800626508897471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=9BFtdH4oQ3m2rgQFhZLZIykqyJx29cTQBstsYI68gUM%3D&reserved=0" target="_blank">X3DJSONLD/x3d-4.0-JSONSchema.json at master · coderextreme/X3DJSONLD (github.com)</a></p></div><div><p class="MsoNormal" style="margin-left:9.6pt"> </p></div><div><p class="MsoNormal" style="margin-left:9.6pt">(Includes Navigation.type update to JSON string instead of JSON array)</p></div><div><p class="MsoNormal" style="margin-left:9.6pt"> </p></div><div><p class="MsoNormal" style="margin-bottom:12pt;margin-left:9.6pt">Thanks for your support!</p></div></div></blockquote></div></blockquote></div></div><p class="MsoNormal" style="margin-bottom:5pt;margin-left:9.6pt">John</p></div></div></blockquote></div></div><p class="MsoNormal" style="margin-left:4.8pt"> </p><p class="MsoNormal"><u></u> <u></u></p></div></div></blockquote></div></div>