[X3D-Ecosystem] JSON to DOM to Bindings
John Carlson
yottzumm at gmail.com
Wed Jun 25 01:29:18 PDT 2025
Note that with imports, instead of require() in ECMAScript, you will need
to add your new Serializer (.js) import to
X3DJSONLD/src/main/node/convertJSON.js in addition to naming it in
X3DJSONLD/src/main/node/json2all.js
Apologies. Let me know if there’s another way. My way uses eval to
resolve the string to an imported variable. I tried dynamic imports
without success:(.
John
On Tue, Jun 24, 2025 at 3:18 AM John Carlson <yottzumm at gmail.com> wrote:
> I am documenting the subject line here.
>
> To convert X3D JSON to DOM to Bindings in X3DJSONLD:
>
> $ cd X3DJSONLD/src/main
>
> Place X3D JSON files in ./data/. The name should end in .json, and not
> include “new.”
>
> $ cd ./shell/.
>
> Edit classpath file to taste.
>
> Convert files:
>
> $ bash runjson.sh
>
> Look at log for errors.
>
> $ cd ../.
>
> Look in */net/coderextreme/data/. for your output.
>
> Edit ./node/json2all.js to add or configure serializers converting from
> DOM.
>
> Recent Serializers include ./node/PythonSerializerX3DJSAIL.js and
> ./node/GuraSerializer.js
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20250625/2f2c5334/attachment-0001.html>
More information about the X3D-Ecosystem
mailing list