<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">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExampleIndex.html</a></li><li><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.x3d">https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.x3d</a></li><li><a href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.json">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:none;padding:0px"><div><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium"><</span><span class="element" 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 class="gmail-attribute" style="color:green;font-family:"Times New Roman";font-size:medium">DEF</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">='</span><a title="bookmark link to FLY_FIRST" href="https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter04ViewingNavigation/NavigationInfoExample.html#FLY_FIRST" class="gmail-idName" style="color:maroon;font-family:"Times New Roman";font-size:medium">FLY_FIRST</a><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">' </span><span class="gmail-attribute" 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 class="gmail-value" style="color:teal;font-family:"Times New Roman";font-size:medium">"FLY" "ANY"</span><span style="color:rgb(0,0,0);font-family:"Times New Roman";font-size:medium">'/></span></div></blockquote><div><br></div>but then provides the (awkwardly expressed) .json conversion result:<br><div><pre style="color:rgb(0,0,0)">          { "NavigationInfo":
            {
              "@DEF":"FLY_FIRST",
              <span style="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">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">direct link to fragment</a>), then adapted here for your example:<pre style=""><pre style="color:rgb(0,0,0)"><b>          { "NavigationInfo":
            {
             <span style="background-color:rgb(255,242,204)"> "@type":["FLY" "ANY"]</span>
            }
          },<br></b></pre><b>Wondering, do you think this the proper way to express that X3D MFString array in JSON?</b></pre><pre style="">Based on the "railroad track" diagrams for JSON arrays and MFString, the square brackets look good to me:</pre><pre style=""><ul><li>X3D to JSON Stylesheet Converter: JSON Arrays</li><li><a href="https://www.web3d.org/x3d/stylesheets/X3dToJson.html#arrays">https://www.web3d.org/x3d/stylesheets/X3dToJson.html#arrays</a></li><li><br></li><li><img src="cid:ii_me1nb3a90" alt="image.png" width="562" height="106"><br></li><li>
<table border="1" cellspacing="2" cellpadding="2" width="800" style="font-family:"Times New Roman""><tbody><tr><td>MFString is array of quoted SFString (XML attribute) values</td><td>JSON array of <i>string</i> type</td></tr></tbody></table></li></ul></pre><pre style=""><br></pre><pre style="">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=""><br>Thanks for all efforts.<br><br>v/r Don<br><pre style="color:rgb(0,0,0)"><br></pre></pre></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 12:14 AM 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">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>