<div dir="auto">Thanks for your explanation, Andreas.  It looks like I should proceed with good speed at coming up with a replacement for X3dToJson.xslt.    which is almost complete, if someone wants to help...<div dir="auto"><br></div><div dir="auto"><a href="https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js">https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/node/DOM2JSONSerializer.js</a><br></div><div dir="auto"><br></div><div dir="auto">One of the last tasks is identifying which arrays should be objects.</div><div dir="auto"><br></div><div dir="auto">John</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mar 5, 2018 12:57 PM, "Andreas Plesch" <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One (fatal) issue with just merging all lines into a single line are<br>
caused by ecmascript single line comments:<br>
<br>
// helpful explanation<br>
var radius1 = outerRadius - toothDepth / 2;<br>
...<br>
<br>
versus<br>
<br>
// helpful explanation var radius1 = outerRadius - toothDepth / 2; ...<br>
<br>
which never evaluates radius1.<br>
<br>
If all comments would be replaced by multiline commenting  as in /*<br>
helpful explanation */ , the single script line may work (if all lines<br>
are carefully terminated by semicolons which is not required in many<br>
situations in ecmascript:<br>
<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Automatic_semicolon_insertion" rel="noreferrer" target="_blank">https://developer.mozilla.org/<wbr>en-US/docs/Web/JavaScript/Refe<wbr>rence/Lexical_grammar#Automati<wbr>c_semicolon_insertion</a><br>
, <a href="https://www.theregister.co.uk/2018/01/12/javascript_technical_group_semicolons/" rel="noreferrer" target="_blank">https://www.theregister.co.uk/<wbr>2018/01/12/javascript_technica<wbr>l_group_semicolons/</a>).<br>
<br>
It is definitely safest (and probably unavoidable) to preserve line<br>
breaks in the json.<br>
<br>
X_ITE itself cannot really do much more than eval the provided script as is.<br>
<br>
-Andreas<br>
<br>
<br>
<br>
<br>
On Mon, Mar 5, 2018 at 11:23 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> Holger, can you look at X_ITE to see the effect of scrunching all the<br>
> VRMLScript in a Script into a single line?  I’m having issues with that<br>
> right now, with JSON.  Thanks!<br>
><br>
><br>
><br>
> John<br>
<br>
<br>
<br>
--<br>
Andreas Plesch<br>
Waltham, MA 02453<br>
</blockquote></div></div>