<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Very nice. I'll exploit it very soon.<br>
Thx<br><br><div class="gmail_quote">Le 3 septembre 2015 19:31:32 UTC+02:00, John Carlson <john@carlsonsolutiondesign.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">





I found this, which you might be able to adapt or use:  <a href="https://github.com/coderextreme/X3DJSONTOD3/blob/master/JSON2X3D.js" class="">https://github.com/coderextreme/X3DJSONTOD3/blob/master/JSON2X3D.js</a>
<div class=""><br class="" />
</div>
<div class="">John<br class="" />
<div>
<blockquote type="cite" class="">
<div class="">On Sep 3, 2015, at 12:28 PM, John Carlson <<a href="mailto:john@carlsonsolutiondesign.com" class="">john@carlsonsolutiondesign.com</a>> wrote:</div>
<br class="Apple-interchange-newline" />
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
What I would do is convert back to XML and do a diff of the two XML documents.  I have something that generates XML from JSON, if you are interested, but I don’t think its the JSON you would expect.
<div class=""><br class="" />
</div>
<div class="">John<br class="" />
<div class="">
<blockquote type="cite" class="">
<div class="">On Sep 3, 2015, at 7:17 AM, Clement IGONET <<a href="mailto:clement@igonet.fr" class="">clement@igonet.fr</a>> wrote:</div>
<br class="Apple-interchange-newline" />
<div class="">
<div dir="ltr" class="">
<div class="">
<div class="">
<div class="">Sounds good.<br class="" />
</div>
Currently, I'm working on a nodejs project and I need to check if the json data I've just created match to a valid X3D (xml) content.<br class="" />
</div>
Is there already something available for such a conversion?<br class="" />
<br class="" />
</div>
Clement.<br class="" />
</div>
<div class="gmail_extra"><br class="" />
<div class="gmail_quote">On Wed, Sep 2, 2015 at 11:59 PM, John Carlson <span dir="ltr" class="">
<<a href="mailto:john@carlsonsolutiondesign.com" target="_blank" class="">john@carlsonsolutiondesign.com</a>></span> wrote:<br class="" />
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">Available here: <a href="http://coderextreme.net/x3djson.js" target="_blank" class="">http://coderextreme.net/x3djson.js</a><span class="HOEnZb"><font color="#888888" class="">
</font><div class=""><font color="#888888" class=""><br class="" />
</font></div>
<div class="">John</div>
</span>
<div class="">
<div class="h5">
<div class=""><br class="" />
</div>
<div class=""><br class="" />
<div class="">
<blockquote type="cite" class="">
<div class="">On Sep 2, 2015, at 4:52 PM, John Carlson <<a href="mailto:john@carlsonsolutiondesign.com" target="_blank" class="">john@carlsonsolutiondesign.com</a>> wrote:</div>
<br class="" />
<div class="">
<div style="word-wrap:break-word" class="">Running
<div class=""><br class="" />
</div>
<div class="">
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">$ java -jar jsonix-schema-compiler/full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd  -b x3d.xjb -p x3djson</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class=""><br class="" />
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">will create x3djson.js with x3djson variable defined</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class=""><br class="" />
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">John</div>
<div class=""><br class="" />
</div>
<div class="">
<blockquote type="cite" class="">
<div class="">On Sep 2, 2015, at 4:28 PM, John Carlson <<a href="mailto:john@carlsonsolutiondesign.com" target="_blank" class="">john@carlsonsolutiondesign.com</a>> wrote:</div>
<br class="" />
<div class="">
<div style="word-wrap:break-word" class="">I ran the following with full path names.  I have not verified this script.  Use at your own risk!   But it should work.  If you don’t want to bother, see the attached JSON schema file.
<div class=""><br class="" />
</div>
<div class="">Download Maven 3
<div class=""><br class="" />
</div>
<div class="">Download <a href="https://github.com/highsource/jsonix-schema-compiler/" target="_blank" class="">https://github.com/highsource/jsonix-schema-compiler/</a></div>
<div class=""><br class="" />
</div>
<div class="">$ git clone <a href="https://github.com/highsource/jsonix-schema-compiler/" target="_blank" class="">https://github.com/highsource/jsonix-schema-compiler/</a></div>
<div class=""><br class="" />
</div>
<div class="">$ cd jsonix-schema-compiler</div>
<div class=""><br class="" />
</div>
<div class="">$ mvn install</div>
<div class=""><br class="" />
</div>
<div class="">Download X3D 3.4 schema</div>
<div class=""><span style="font-family:Menlo;font-size:11px" class=""><br class="" />
</span></div>
<div class="">$ <span style="font-family:Menlo;font-size:11px" class="">wget <a href="http://www.web3d.org/specifications/x3d-3.4.xsd" target="_blank" class="">
http://www.web3d.org/specifications/x3d-3.4.xsd</a></span></div>
<div class="">
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">$ wget <a href="http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPublic.xsd" target="_blank" class="">
http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPublic.xsd</a></div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">$ wget <a href="http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPrivate.xsd" target="_blank" class="">
http://www.web3d.org/specifications/x3d-3.4-Web3dExtensionsPrivate.xsd</a></div>
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class=""><br class="" />
</div>
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">
<div style="margin:0px" class="">$ java -jar full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd </div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class="">Look at generated.js</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class="">Note that there’s an error from the command-line.  This page: <a href="http://techiquest.blogspot.com/2012/02/xml-schema-to-java-binding-large.html" target="_blank" class="">http://techiquest.blogspot.com/2012/02/xml-schema-to-java-binding-large.html</a></div>
<div style="margin:0px" class="">says to change the configuration like this:</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class="">
<pre style="font-size:15.3999996185303px;line-height:19.25px;margin-top:0px;margin-bottom:0px" class=""><span style="color:rgb(6,40,115);font-weight:bold" class=""><jaxb:bindings</span> </pre>
<pre style="font-size:15.3999996185303px;line-height:19.25px;margin-top:0px;margin-bottom:0px" class=""><span style="color:rgb(64,112,160)" class="">        schemaLocation="file:SWIFT-FIN-November-2011-Data-Dictionary.xsd"</span><span style="color:rgb(6,40,115);font-weight:bold" class="">></span>
        <span style="color:rgb(6,40,115);font-weight:bold" class=""><jaxb:bindings></span>
            <span style="color:rgb(6,40,115);font-weight:bold" class=""><jaxb:globalBindings</span> <span style="color:rgb(64,112,160)" class="">typesafeEnumMaxMembers="600"</span><span style="color:rgb(6,40,115);font-weight:bold" class="">/></span>
        <span style="color:rgb(6,40,115);font-weight:bold" class=""></jaxb:bindings></span>
<span style="color:rgb(6,40,115);font-weight:bold" class=""></jaxb:bindings></span></pre>
<div class=""><br class="" />
</div>
<div class=""><br class="" />
</div>
<div class=""><br class="" />
</div>
<div class="">However, I created my own x3d.xjb file that look like this:</div>
<div class=""><br class="" />
</div>
<div class="">
<div style="margin:0px" class=""><?xml version="1.0" ?></div>
<div style="margin:0px" class=""><bindings version="1.0" xmlns="<a href="http://java.sun.com/xml/ns/jaxb" target="_blank" class="">http://java.sun.com/xml/ns/jaxb</a>" schemaLocation="x3d-3.4.xsd"></div>
<div style="margin:0px" class="">        <bindings></div>
<div style="margin:0px" class="">            <globalBindings typesafeEnumMaxMembers="600"/></div>
<div style="margin:0px" class="">        </bindings></div>
<div style="margin:0px" class=""></bindings></div>
</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class="">And ran:</div>
<div style="margin:0px" class=""><br class="" />
</div>
<div style="margin:0px" class="">
<div style="margin:0px" class="">$ java -jar full/target/jsonix-schema-compiler-full-2.3.7-SNAPSHOT.jar x3d-3.4.xsd  -b x3d.xjb </div>
<div class=""><br class="" />
</div>
<div class=""><br class="" />
</div>
<div class="">without errors. Hopefully the generated.js will work for you.  Attached.</div>
</div>
</div>
</div>
</div>
</div>
<span class=""><generated.js></span>
<div style="word-wrap:break-word" class="">
<div class="">
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">
<div style="margin:0px" class="">
<div style="margin:0px" class="">
<div class=""></div>
</div>
</div>
</div>
</div>
</div>
<span class=""><x3d.xjb></span>
<div style="word-wrap:break-word" class="">
<div class="">
<div style="margin:0px;font-size:11px;font-family:Menlo" class="">
<div style="margin:0px" class="">
<div style="margin:0px" class="">
<div class=""><a href="http://coderextreme.net/generated.js" target="_blank" class="">http://coderextreme.net/generated.js</a></div>
<div class=""><a href="http://coderextreme.net/x3d.xjb" target="_blank" class="">http://coderextreme.net/x3d.xjb</a></div>
</div>
</div>
<div style="margin:0px" class="">Note that this schema does not comply with the current X3D JSON proposed standard.  I suggest we start with the JSON schema and modify it to suit our needs.</div>
<div class=""><br class="" />
</div>
</div>
<div class=""><br class="" />
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="" />
</div>
</div>
</div>
</blockquote>
</div>
<br class="" />
</div>
</div>
</div>
</div>
<br class="" />
------------------------------------------------------------------------------<br class="" />
Monitor Your Dynamic Infrastructure at Any Scale With Datadog!<br class="" />
Get real-time metrics from all of your servers, apps and tools<br class="" />
in one place.<br class="" />
SourceForge users - Click here to start your Free Trial of Datadog now!<br class="" />
<a href="http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140" rel="noreferrer" target="_blank" class="">http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140</a><br class="" />
_______________________________________________<br class="" />
X3dom-users mailing list<br class="" />
<a href="mailto:X3dom-users@lists.sourceforge.net" class="">X3dom-users@lists.sourceforge.net</a><br class="" />
<a href="https://lists.sourceforge.net/lists/listinfo/x3dom-users" rel="noreferrer" target="_blank" class="">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a><br class="" />
<br class="" />
</blockquote>
</div>
<br class="" />
</div>
</div>
</blockquote>
</div>
<br class="" />
</div>
</div>
</div>
</blockquote>
</div>
<br class="" />
</div>


</blockquote></div><br>
clement@igonet.fr</body></html>