<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>I handle JSON by converting JS to DOM after the JSON has been parsed (X3DJSONLD.js). I also have nashorn examples here:  <a href="https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/nashorn/net/coderextreme/data">https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/nashorn/net/coderextreme/data</a>  and node.js examples here:  <a href="https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/node/net/coderextreme/data">https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/node/net/coderextreme/data</a>  (requires java-npm library).  The JS APIs are written on top of X3DJSAIL (direct API map of functions to constructors):   <a href="http://www.web3d.org/specifications/java/X3DJSAIL.html">http://www.web3d.org/specifications/java/X3DJSAIL.html</a> and thus, are server-side. I currently have no plans to write a pure JS API, but you might try using JSweet to convert Java to JS or TS (problems with converting jars to to JS). Maybe start with this: https://github.com/coderextreme/JavaSceneAuthoringInterfaceLibrary</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have found it easier to convert JSON to DOM, because all the infrastructure in X3DOM is set up to use DOM and the infrastructure in X_ITE is to use DOM and VRML.   While it might be preferable to write native JSON events (and I have done things like this, you are welcome to help), the work is unfinished.  Real PROTOs are present in X_ITE, but not X3DOM (there is a “proto expander” for JSON documents). I don’t know the proper status of Scripts in X3DOM.  What’s important there is routing to and from the Script.</p><p class=MsoNormal><br>If you were to take on a pure JS API, I would recommend using modules in JavaScript, if they are still in the standard.   That way you can limit the amount of code you load.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><br>There is very little reason to use a JS library unless you are writing Scripts in my examples. I recommend getting help here and other places in order to get the minimum of scripting required (for example, Emitters encapsulate random numbers).</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If you share your use cases, you may be able to get a better leg up.  It sure helped me.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Good luck,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>John</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>>> I also had some curiosity about what it takes to WRITE a JS library like the X3D "parser", I guess you could call it....?</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>>John Carlson has created X3DJSONLD open-source library:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>>             https://github.com/coderextreme/X3DJSONLD</p></div></body></html>