<div dir="auto">I also agree with Holger.  The point is, X3dToJson.xslt does not follow the spec.  I’ve tried it many times.</div><div dir="auto"><br></div><div dir="auto">John<br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Thu, Aug 7, 2025 at 1:28 PM Holger Seelig via X3D-Ecosystem <<a href="mailto:x3d-ecosystem@web3d.org">x3d-ecosystem@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-break:after-white-space"><div>Since X_ITE can generate JSON files, we have the same problem here, and there is already an open issue about this very problem:</div><div><br></div><div><a href="https://github.com/create3000/x_ite/issues/146" target="_blank">https://github.com/create3000/x_ite/issues/146</a><br></div><div><br></div><div>I agree with Don here that all MF* fields are encoded as JSON arrays, including NavigationInfo.type. Anything else doesn't make sense, in my opinion, and that's what X_ITE does too.</div><div><br></div><div>Best regards,</div><div>Holger</div><div></div><div>
<div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;line-break:after-white-space"><div dir="auto" style="text-align:start;text-indent:0px;line-break:after-white-space"><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">—</div><div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none">Holger Seelig<br><a href="mailto:holger.seelig@yahoo.de" target="_blank">holger.seelig@yahoo.de</a><br><br></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<div><br><blockquote type="cite"></blockquote></div></div><div style="line-break:after-white-space"><div><blockquote type="cite"><div>Am 07.08.2025 um 20:08 schrieb Don Brutzman via X3D-Ecosystem <<a href="mailto:x3d-ecosystem@web3d.org" target="_blank">x3d-ecosystem@web3d.org</a>>:</div><br><div><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><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"><</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"> </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">='</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">' </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">='</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">'/></span></div></blockquote><div><br></div>but then provides the (awkwardly expressed) .json conversion result:<br><div><pre style="font-family:monospace">          { "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"><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"><span id="m_1952100102721425508cid:ii_me1nb3a90"><image.png></span><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"><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>
-- <br>X3D-Ecosystem mailing list<br><a href="mailto:X3D-Ecosystem@web3d.org" target="_blank">X3D-Ecosystem@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org</a><br></div></blockquote></div><br></div>-- <br>
X3D-Ecosystem mailing list<br>
<a href="mailto:X3D-Ecosystem@web3d.org" target="_blank">X3D-Ecosystem@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org</a><br>
</blockquote></div></div>