<div dir="ltr">I am very happy this is being taken care of!  This was one thing on the back burner.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Nov 21, 2020 at 2:04 AM Don Brutzman <<a href="mailto:brutzman@nps.edu">brutzman@nps.edu</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">These all look identical so there is probably a single simple bug.<br>
<br>
Am guessing the superflous comma is related to initial (or solitary) empty string value in an MFString list.<br>
<br>
Next steps in sleuthing:<br>
<br>
- pick one or two example models (likely containing MetadataString and Text nodes),<br>
- look at original XML for what information is expected,<br>
- manually translate to show what is expected JSON output,<br>
- comparison between expected and converted is the error result, localizing the problem.<br>
- going into stylesheet to fix the conversion logic error is then straightforward.<br>
<br>
p.s. if you look at TestSchematronDiagnostics you will see that it is nothing but syntax errors for testing purposes, so conversion success is not expected.<br>
<br>
On 11/20/2020 10:44 PM, John Carlson wrote:<br>
> <br>
> For a visualization of the errors, I did a grep:<br>
> <br>
> $ find . -name '*json' -print0|xargs -0 grep '\[,'<br>
> ./Basic/development/MetadataPrototypes.json:                                    "@string":[,""],<br>
> ./Basic/development/MetadataPrototypes.json:                                    "@string":[,""],<br>
> ./Basic/development/TestSchematronDiagnostics.json:                    "@string":[,"",x\" '],<br>
> ./ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json:                                "@string":[,""],<br>
> ./ConformanceNist/BindableNodes/Viewpoint/viewinline.json:                                      "@string":[,""],<br>
> ./Vrml2Sourcebook/Siggraph98Course/Button.json:                      "@value":[,""]<br>
> ./Vrml2Sourcebook/Siggraph98Course/Button.json:                      "@value":[,""]<br>
> ./Vrml2Sourcebook/Siggraph98Course/Cut.json:                                                "@string":[,""],<br>
> ./Vrml2Sourcebook/Siggraph98Course/Loader.json:                  "@value":[,""]<br>
> ./Vrml2Sourcebook/Siggraph98Course/Query.json:                          "@string":[,""],<br>
> ./Vrml2Sourcebook/Siggraph98Course/TextFont.json:                    "@string":[,"","Sans"],<br>
> ./Vrml2Sourcebook/Siggraph98Course/TextFont.json:                    "@string":[,"",,"","Typewriter"],<br>
> ./Vrml2Sourcebook/Siggraph98Course/TextSize.json:                    "@string":[,"","Medium"],<br>
> ./Vrml2Sourcebook/Siggraph98Course/TextSize.json:                    "@string":[,"","Large"],<br>
> ./X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json:                              "@value":[,""]<br>
> ./X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json:                              "@value":[,""]<br>
> <br>
> <br>
> On Sat, Nov 21, 2020 at 12:33 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
>     Many of these are due to-- [,  non-existent first element in an array.   Perhaps there is an issue with X3dToJson.xslt?<br>
> <br>
>     On Sat, Nov 21, 2020 at 12:26 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
>         Found some more, will try to Download JSON zip and rerun.<br>
> <br>
>         $ grep Failed results.txt |grep parse|grep -v originals|grep -v develop|grep -v Xvl|grep -v save<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json</a> <<a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json</a>> SyntaxError: Unexpected token , in JSON at position 6705<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/viewinline.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/viewinline.json</a> <<a href="http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/viewinline.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/viewinline.json</a>> SyntaxError: Unexpected token , in JSON at position 15644<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Button.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Button.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Button.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Button.json</a>> SyntaxError: Unexpected token , in JSON at position 3487<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.json</a>> SyntaxError: Unexpected token , in JSON at position 12319<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.json</a>> SyntaxError: Unexpected token , in JSON at position 8231<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Query.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Query.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Query.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Query.json</a>> SyntaxError: Unexpected token , in JSON at position 4342<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json</a>> SyntaxError: Unexpected token , in JSON at position 3918<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json</a>> SyntaxError: Unexpected token , in JSON at position 3958<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json</a> <<a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json</a>> SyntaxError: Unexpected token , in JSON at position 12368<br>
>         Failed JSON parse C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json</a> <<a href="http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest_RoundTrip.json</a>> SyntaxError: Unexpected token , in JSON at position 12474<br>
> <br>
>         On Sat, Nov 21, 2020 at 12:11 AM John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a> <mailto:<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>>> wrote:<br>
> <br>
>             Best I've seen yet.  I recommend putting quotes around version where it's a number (should be a string), just for grins!  I'm not sure what you want to do with the saved Nancy file.<br>
> <br>
>             $ more jsonparseresults.txt |grep parse|grep -v development|grep -v Xvl|grep -v originals<br>
>             json-parse json Expected a ',' or '}' at 2510 [character 32 line 69] C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json</a> <<a href="http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json</a>><br>
>             json-parse json JSONObject["@version"] not a string. C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json</a> <<a href="http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedAlternativeEncoding.json</a>><br>
>             json-parse json JSONObject["@version"] not a string. C:/x3d-code/<a href="http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json" rel="noreferrer" target="_blank">www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json</a> <<a href="http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json" rel="noreferrer" target="_blank">http://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/HelloWorldCommentedOriginalEncoding.json</a>><br>
> <br>
<br>
all the best, Don<br>
-- <br>
Don Brutzman  Naval Postgraduate School, Code USW/Br       <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149<br>
X3D graphics, virtual worlds, navy robotics <a href="http://faculty.nps.edu/brutzman" rel="noreferrer" target="_blank">http://faculty.nps.edu/brutzman</a><br>
</blockquote></div>