<div dir="auto">Quick heads up. field.type field should retain its SFString type. If reasonable, show prototype and Script examples.</div><div dir="auto"><br></div><div dir="auto">I’m currently resting my wrists!</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Fri, Aug 8, 2025 at 10:21 AM Don Brutzman <<a href="mailto:don.brutzman@gmail.com">don.brutzman@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto">BLUF: NavigationInfo.type problem fixed in JSON conversion. Troubleshooting summary follows .</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="auto"></div><div dir="ltr">After some deep-dive debugging, I figured out the root cause of conversion problems. NavigationInfo.type was inadvertantly being misclassified as SFString vice MFString in the X3dToJson.xslt stylesheet.<div><br></div><div>Issue summary:<br><div><ul><li><span style="color:rgb(85,85,85);font-family:Lato,sans-serif;font-size:14px">valid 1-line .x3d: </span>
<span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><</span><span style="color:navy;font-family:"Times New Roman";font-size:medium">NavigationInfo</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"> </span><span style="color:green;font-family:"Times New Roman";font-size:medium">type</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">='</span><span style="color:teal;font-family:"Times New Roman";font-size:medium">
"EXAMINE" "FLY" "ANY"</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">'/></span></li><li><span style="color:rgb(85,85,85);font-family:Lato,sans-serif;font-size:14px">failing 1-line .json: { "NavigationInfo": {"@type":"\"EXAMINE\" \"FLY\" \"ANY\""}},</span></li><li><span style="color:rgb(85,85,85);font-family:Lato,sans-serif;font-size:14px">goal 1-line .json: { "NavigationInfo": {"@type":</span><span style="box-sizing:inherit;margin:0px;padding:0px;border:0px;outline:0px;font-size:14px;vertical-align:baseline;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;color:rgb(85,85,85);font-family:Lato,sans-serif">["EXAMINE","FLY","ANY"]</span><span style="color:rgb(85,85,85);font-family:Lato,sans-serif;font-size:14px">}},</span></li></ul></div><div>Stylesheet flaw now fixed, NavigationInfo.type outputs are much more readable and understandable. Updated example url addresses follow, corrected from before. (Please be advised that <a href="http://x3dgraphics.com" target="_blank">x3dgraphics.com</a> site is no longer latest version, the primary build is migrated to <a href="http://web3d.org" target="_blank">web3d.org</a>).</div><div><div><ul><li style="margin-left:15px">X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 04 Viewing Navigation, Navigation Info Example</li><li style="margin-left:15px"><a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExampleIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExampleIndex.html</a></li><li style="margin-left:15px"><a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.html#25" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.html#25</a></li><li style="margin-left:15px"><a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.json" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.json</a></li></ul><div>Corrected JSON excerpt:</div><div><span style="color:rgb(0,0,0)"> { "NavigationInfo":</span></div><div><pre style="color:rgb(0,0,0)"> {
"@DEF":"FLY_FIRST",
<span style="background-color:rgb(0,255,0)">"@type":["FLY","ANY"]</span>
}
},</pre></div><div><div>Am now running regression builds on all .json conversions in X3D Examples Archives. Results from last night have gotten through about half of the archives. Have posted interim results at the regular location for preliminary inspection today, if desired.</div></div></div></div></div><div><ul><li><a href="https://www.web3d.org/x3d/content/examples/build.json.all.log.txt" target="_blank">https://www.web3d.org/x3d/content/examples/build.json.all.log.txt</a></li></ul><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><font face="monospace" size="1">C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\X3dForWebAuthors/Chapter04ViewingNavigation//NavigationInfoExample.json validation checking with jslint<br>C:\x3d-code\<a href="http://www.web3d.org" target="_blank">www.web3d.org</a>\x3d\content\examples\X3dForWebAuthors/Chapter04ViewingNavigation//NavigationInfoExample.json validation checking with json-schema-validator<br>... does not support latest JSON Schema, this test is not yet usable</font></blockquote><div><br></div><div>Continuing, I checked the other stylesheet converters for this necessary evaluation of Navigation.type as MFString vice SFString. The same bug found was elsewhere and fixed.</div></div><div><br></div><div>Checking the revised Java converter, looks like actual results were nevertheless handled OK:</div><div><ul><li><a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.java" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.java</a></li><li><pre style="color:rgb(0,0,0)">.addChild(new NavigationInfo("FLY_FIRST").setType(<span style="background-color:rgb(0,255,0)">new String[] {"FLY","ANY"}</span>))</pre></li></ul></div><div>Checking the revised Python converter, again looks like actual results were handled OK:</div><div><ul><li><a href="https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.py" target="_blank">https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.py</a></li><li><pre style="color:rgb(0,0,0)">NavigationInfo(DEF='FLY_FIRST',<span style="background-color:rgb(0,255,0)">type=["FLY","ANY"]</span>),</pre></li></ul></div></div>And so, the example .x3d model and the various stylesheet corrections have been committed to version control. Stylesheets are online at<div><ul><li><a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/" target="_blank">https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/</a></li><li><a href="https://sourceforge.net/p/x3d/code/37350/" target="_blank">https://sourceforge.net/p/x3d/code/37350/</a> shows revision</li></ul><div>Hopefully this is all sorted out now. Future work will look at X3DJSAIL Java and X3DPSAIL x3d.py Python export to ensure consistent results.</div><div><br></div><div>Thanks for all support in identifying this issue and determining the proper correction needed.</div><div><br></div><div>All the best, Don</div></div></div><div dir="ltr"><div><div><br><div><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 11:08 AM Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@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">So sorry John but I really have no idea what you are talking about in your response.<div><br></div><div>I just looked but am not finding what you refer to in the tickets on sourceforge, there are many overlapping entries regarding converters. It is challenging but I will continue to tackle reported problems there, one by one.</div><div><ul><li><a href="https://sourceforge.net/p/x3d/tickets/" target="_blank">https://sourceforge.net/p/x3d/tickets/</a></li></ul><div>Confirmation by anyone on JSON MFString syntax will help, all shared understanding is welcome. Recap, best example so far seems to be</div><div><pre style="color:rgb(0,0,0)"><b> { "NavigationInfo":
{
<span style="background-color:rgb(255,242,204)"> "@type":["FLY" "ANY"]</span>
}
},</b></pre></div><div>Given best assessments and well-formed JSON checks regarding syntax, I will work on</div><div><ul><li>updating X3dToJson.xslt to match the MFString "railroad tracks" syntax,</li><li>updating autogenerated x3d.py serialization into JSON to perform MFString representations similarly,</li><li>(someday) produce an X3D JSON Schema autogenerated from X3DUOM to support type-aware X3D JSON validation.</li></ul><div>Hope this helps. Very respectfully, Don</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 10:41 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">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="auto">Don, this is a separate issue, separate from X3DJSAIL. You have been provided the correct information many times. You have been pointed at the spec many times you list below many times. Aaron was addressed in this message, not you. If you want an example of correct MFStrings in JSON, beyond what I’ve provided, look at url fields in X3D JSON.</div><div dir="auto"><br></div><div dir="auto">AFAIK, X3dToJson web pages has been correct for a long time and X3dToJson.xslt was correct until other logic got introduced. At the time, I complained, and I continued to complain and we kept getting stuck in the same loop. I thought that Aaron might have a solution for RawKee and x3d.py, so I messaged him.</div><div dir="auto"><br></div><div dir="auto">Please return to SourceForge, I have provided a one-liner as to what I expect.</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 12:08 PM Don Brutzman <<a href="mailto:don.brutzman@gmail.com" target="_blank">don.brutzman@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"><div dir="ltr">John, thank you for identifying this problem when converting to JSON. The detailed description that you have crafted provides a good example of "almost a repeatable issue report".</div><div dir="ltr"><div><br></div><div>You have provided <b>valid input .x3d</b> and a reportedly<b> improper output in JSON.</b><br><div><br></div><div>Please provide what you think the <b>correct JSON output</b> needs to be.</div></div><div><br></div>I looked online and quickly found<br><ul><li>X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 04 Viewing Navigation, Navigation Info Example</li><li><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExampleIndex.html" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExampleIndex.html</a></li><li><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.x3d" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.x3d</a></li><li><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.json" target="_blank">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.json</a></li></ul>which includes the (correctly expressed, highly validated) .x3d node<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:medium;padding:0px"><div><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)"><</span><span style="font-family:"Times New Roman";font-size:medium;color:navy">NavigationInfo</span><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)"> </span><span style="font-family:"Times New Roman";font-size:medium;color:green">DEF</span><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)">='</span><a title="bookmark link to FLY_FIRST" href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.html#FLY_FIRST" style="font-family:"Times New Roman";font-size:medium;color:maroon" target="_blank">FLY_FIRST</a><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)">' </span><span style="font-family:"Times New Roman";font-size:medium;color:green">type</span><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)">='</span><span style="font-family:"Times New Roman";font-size:medium;color:teal">"FLY" "ANY"</span><span style="font-family:"Times New Roman";font-size:medium;color:rgb(0,0,0)">'/></span></div></blockquote><div><br></div>but then provides the (awkwardly expressed) .json conversion result:<br><div><pre style="font-family:monospace;color:rgb(0,0,0)"> { "NavigationInfo":
{
"@DEF":"FLY_FIRST",
<span style="font-family:monospace;background-color:rgb(252,229,205)">"@type":"\"FLY\" \"ANY\""</span>
}
},</pre>Wondering, is that conversion correct? (Am guessing no, it is not)<br><br>Based on the X3dToJson conversion page, I'd expect something different:<br><ul><li>X3D to JSON Stylesheet Converter: Examples, Origami Cranes</li><li><a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html#OrigamiCranes" target="_blank">https://www.web3d.org/x3d/stylesheets/X3dToJson.html#OrigamiCranes</a></li></ul>with (<a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html#OrigamiCranes:~:text=%7B%20%22NavigationInfo%22%3A%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22%40type%22%3A%5B%22NONE%22%5D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%2C" target="_blank">direct link to fragment</a>), then adapted here for your example:<pre style="font-family:monospace"><pre style="font-family:monospace;color:rgb(0,0,0)"><b style="font-family:monospace"> { "NavigationInfo":
{
<span style="font-family:monospace;background-color:rgb(255,242,204)"> "@type":["FLY" "ANY"]</span>
}
},<br></b></pre><b style="font-family:monospace">Wondering, do you think this the proper way to express that X3D MFString array in JSON?</b></pre><pre style="font-family:monospace">Based on the "railroad track" diagrams for JSON arrays and MFString, the square brackets look good to me:</pre><pre style="font-family:monospace"><ul style="font-family:monospace"><li style="font-family:monospace">X3D to JSON Stylesheet Converter: JSON Arrays</li><li style="font-family:monospace"><a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html#arrays" style="font-family:monospace" target="_blank">https://www.web3d.org/x3d/stylesheets/X3dToJson.html#arrays</a></li><li style="font-family:monospace"><br></li><li style="font-family:monospace"><img src="cid:ii_me1nb3a90" alt="image.png" style="width:598px;max-width:100%"><br></li><li style="font-family:monospace">
<table border="1" cellspacing="2" cellpadding="2" width="800" style="font-family:"Times New Roman""><tbody style="font-family:"Times New Roman""><tr style="font-family:"Times New Roman""><td style="font-family:"Times New Roman"">MFString is array of quoted SFString (XML attribute) values</td><td style="font-family:"Times New Roman"">JSON array of <i style="font-family:"Times New Roman"">string</i> type</td></tr></tbody></table></li></ul></pre><pre style="font-family:monospace"><br></pre><pre style="font-family:monospace">p.s. (One more point, please: let's proceed step by step... There is no need to discuss Python whatsoever in this issue, that is a separate issue we can tackle after this. Including it as part of the mix here only adds unnecessary complexity/confusion.)</pre><pre style="font-family:monospace"><br>Thanks for all efforts.<br><br>v/r Don<br><pre style="font-family:monospace;color:rgb(0,0,0)"><br></pre></pre></div></div></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 12:14 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">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">For Aaron: Another notice on PythonSeriializer.js and x3d.py<div><br></div><div>PythonSerializer.js translates NavigationInfo.type to:</div><div><br></div><div>NavigationInfo8 = x3d.NavigationInfo()<br>NavigationInfo8.type = ["ANY","EXAMINE","WALK","FLY","LOOKAT"]</div><div><br></div><div>Which appears OK to me.</div><div><br></div><div>When I get X3D JSON output from x3d.py, I get:</div><div><br></div><div> {<br> "NavigationInfo":<br> {<br> {<br> "@type":""ANY" "EXAMINE" "WALK" "FLY" "LOOKAT""<br> }<br> },</div><div><br></div><div><br></div><div>Which doesn't look right at all.</div><div><br></div><div>I pretty much know that X3D JSON output from x3d.py has been iffy. I wonder if Aaron has better output as X3D JSON with url fields especially. Can any JSON generating Python be shared yet? Maybe after SIGGRAPH and Web3D Conference?</div><div><br></div><div>Python is attached,and original .<a href="http://x3d.as" target="_blank">x3d.as</a> well as JSON output</div><div><br></div><div>Thanks for any additions to x3d.py!</div><div><br></div><div>I am looking at the GraalPySerializer.js and realizing I left some semicolons in. Retesting is going well, but apparently, I need to set up a function or alias in bash to do things right.</div><div><br></div><div>John</div></div>
</blockquote></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div>
</div></div></div></div>
</blockquote></div></div>