<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">I'm working on temporarily patching HelloWorldProgramOutput.json to make it so I can create Java from it. I know how to patch the java (Don, see below enclosed--previous message). I am now trying to repair the JSON I use to create it. Note that the Java I produce does not have two sets of @value diffs, probably because the JSON parser:</div><div dir="ltr"><br></div><div dir="ltr">import javax.json.JsonObject;</div><div dir="ltr"><br></div><div dir="ltr">dropped one with the same property name, as previously discussed. I suggest passing your JSON through jsonlint and diff, as this command does:</div><div dir="ltr">$ jsonlint C:/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json">www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json</a> | diff - ../../../data/HelloWorldProgramOutput.json</div><div dir="ltr">[snipped output, if you want evidence, mail me privately]<br><div><br></div><div><div>diff ../../../data/HelloWorldProgramOutput.json /c/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json">www.web3d.org/x3d/stylesheets/java/examples/HelloWorldProgramOutput.json</a></div><div>103c103</div><div>< "@content":"1 July 2023"</div><div>---</div><div>> "@content":"3 July 2023"</div><div>226c226</div><div>< "@value":["Top-level root Metadata node beneath Scene needs to be one of '-children' in ..."]</div><div>---</div><div>> "@value":["Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding"]</div><div>1482c1482</div><div>< "@value":["Top-level root Metadata node beneath Scene needs to be one of '-children' in ..."]</div><div>---</div><div>> "@value":["Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding"]</div><div>2691c2691</div><div>< }</div><div>---</div><div>> }</div><div>\ No newline at end of file</div></div><div><br></div><div><br></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 3, 2023 at 9:29 AM John Carlson <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>There's no HelloHelloWorldProgramOutput.java in the java/examples folder?</div><div><br></div><div>I see the problem with the MetataString setValue method call:</div><div><br></div><div>---Original</div><div><div>203,204c203</div><div>< .addMetadata(new MetadataString("scene.addChildMetadata").setName("test").setValue(new String[] {"Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON</div><div>< encoding"}))</div><div>---Fixed</div><div>> .addMetadata(new MetadataString("scene.addChildMetadata").setName("test").setValue(new String[] {"Top-level root Metadata node beneath Scene needs to be one of '-children' in JSON encoding"}))</div></div><div><br></div><div>Unquoted newlines are not allowed in Java. Search for the JSON at the end of the line, then join the two lines. Corrected source code is attached.</div><div><br></div><div>I'm not sure why Saxon??? is chopping the line in two. I will research other versions of Saxon. Maybe there was a change to X3dToJava.xslt></div><div><br></div><div>Thanks!</div><div><br></div><div>John</div><div><br></div><div>c:/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples" target="_blank">www.web3d.org/x3d/stylesheets/java/examples</a></div><div>$ ls -ltr *class *java</div><div>-rw-r--r-- 1 john 197121 285815 Jul 2 01:49 CleatClamp.class</div><div>-rw-r--r-- 1 john 197121 195539 Jul 2 01:49 CleatClamp.java</div><div>-rw-r--r-- 1 john 197121 114112 Jul 2 01:49 HelloWorldProgram.java</div><div>-rw-r--r-- 1 john 197121 36474 Jul 2 01:49 HelloWorldProgramOutput.class</div><div>-rw-r--r-- 1 john 197121 11911 Jul 2 01:49 flowers4.class</div><div>-rw-r--r-- 1 john 197121 69291 Jul 3 05:17 HelloWorldProgram.class</div><div><br></div><div>c:/x3d-code/<a href="http://www.web3d.org/x3d/stylesheets/java/examples" target="_blank">www.web3d.org/x3d/stylesheets/java/examples</a></div><div>$ svn up .</div><div>Updating '.':</div><div>At revision 35199.</div></div></div></div></div>
</blockquote></div></div>