[x3d-public] ANNOUNCE: x3djsonld.py X3D JSON to Python (Load and Export) Pre-Beta Testers wanted

John Carlson yottzumm at gmail.com
Tue Mar 8 12:07:12 PST 2022


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.

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!

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.

But right now, your opportunity is with x3djsonld.py.   See below link
included

Note: depending on your python installation,
You’ll have to do:

from x3d import *

or

from x3d.x3d import *

at the top of x3djsonld.py and generated python program at the bottom of
x3djsonld.py

John

On Sun, Mar 6, 2022 at 3:08 AM John Carlson <yottzumm at gmail.com> wrote:

> I have written an "X3D Loader" which loads JSON and exports Python:
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/x3djsonld.py
>
> 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.
>
> Download from link above, install x3d or set PYTHONPATH to the x3d.py
> containing folder, and then run
>
> $ python x3djsonld.py file.json # replacing file.json with your desired
> JSON file.
>
> This produces python which can be run with python.  It will generate XML
> on standard output, so you might do:
>
> $ python x3djsond.py file.json | python
>
> to produce XML
>
> People who can do round-trip to XML and compare would be especially
> valuable!
>
> People who can analyze HAnim models are valuable!
>
> It might be fun to convert glTF to python, but I haven't tried it yet!
>
> Known issues:
>
> field/value with type MFVec3f doesn't seem to be handled. (arc*.json,
> for*.json)
>
> There are problems with Nancy I haven't had a chance to look at
>
> I'm not sure if multiline comments work.
>
> Enough for tonight!
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220308/37b7ac8d/attachment.html>


More information about the x3d-public mailing list