<div dir="auto">Note that I only have one more day/night to work on this, and then I may not be able to work comfortably due to health issues.</div><div dir="auto"><br></div><div dir="auto">So if you like the idea of using python and x3d.py to transpile JSON into python, know JSON and python, now’s the time to take action and help iron out bugs!</div><div dir="auto"><br></div><div dir="auto">The alternative is to use X3DJSONLD in another language (ECMAScript, Java, and C++) to convert JSON to XML, then go to Python using X3dToPython.xslt.   X3DJSAIL+X3DJSONLD.java offers the opportunity to do this in one program, but you’ll have put in some elbow grease to accomplish this.   There are examples of using X3DJSONLD.java to accomplish this for other encodings.</div><div dir="auto"><br></div><div dir="auto">But right now, your opportunity is with x3djsonld.py.   See below link included</div><div dir="auto"><br></div><div dir="auto">Note: depending on your python installation,</div><div dir="auto">You’ll have to do:</div><div dir="auto"><br></div><div dir="auto">from x3d import *</div><div dir="auto"><br></div><div dir="auto">or</div><div dir="auto"><br></div><div dir="auto">from x3d.x3d import *</div><div dir="auto"><br></div><div dir="auto">at the top of x3djsonld.py and generated python program at the bottom of x3djsonld.py</div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 6, 2022 at 3:08 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-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div dir="ltr">I have written an "X3D Loader" which loads JSON and exports Python: <a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py</a><br><div><br></div><div>I would like some pre-beta testers who have X3D JSON files or can generate them; to load into python, then convert to X3DPSAIL (x3d.py) python code using x3djsonld.py.</div><div><br></div><div>Download from link above, install x3d or set PYTHONPATH to the x3d.py containing folder, and then run</div><div><br></div><div>$ python x3djsonld.py file.json # replacing file.json with your desired JSON file.</div><div><br></div><div>This produces python which can be run with python.  It will generate XML on standard output, so you might do:</div><div><br></div><div>$ python x3djsond.py file.json | python</div><div><br></div><div>to produce XML</div><div><br></div><div>People who can do round-trip to XML and compare would be especially valuable!</div><div><br></div><div>People who can analyze HAnim models are valuable!</div><div><br></div><div>It might be fun to convert glTF to python, but I haven't tried it yet!</div><div><br></div><div>Known issues:</div><div><br></div><div>field/value with type MFVec3f doesn't seem to be handled. (arc*.json, for*.json)</div><div><br></div><div>There are problems with Nancy I haven't had a chance to look at</div><div><br></div><div>I'm not sure if multiline comments work.</div><div><br></div><div>Enough for tonight!</div><div><br></div></div>
</blockquote></div></div>