[x3d-public] Low hanging fruit for JSON parsing (not validation) of archive.

John Carlson yottzumm at gmail.com
Tue Mar 30 16:12:00 PDT 2021


Here is an alternate list of errors.  I am not sure why they didn't show 
up before, but perhaps they were not in previous (January) download.

If there are no takers on triaging this list, I will take it upon myself.

Again, these are JSON errors, not validation errors, so likely there is 
something fundamentally broken in the file, such that it can't be parsed.

If these files weren't born as JSON, it's likely that there may be an 
issue with X3dToJSON.xslt.

I have checked the date on a couple of these files, and it appears to be 
April 27 2018.

John

grep Failed results.txt|grep -v node_modules|grep -v development
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/viewinline.json 
SyntaxError: Unexpected token , in JSON at position 15644
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/ConformanceNist/BindableNodes/Viewpoint/jumpcut_proximitysensor.json 
SyntaxError: Unexpected token , in JSON at position 6705
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter14Prototypes/HudKelpForest.json 
SyntaxError: Unexpected token , in JSON at position 12368
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextFont.json 
SyntaxError: Unexpected token , in JSON at position 3918
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Loader.json 
SyntaxError: Unexpected token , in JSON at position 8231
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Cut.json 
SyntaxError: Unexpected token , in JSON at position 12319
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Query.json 
SyntaxError: Unexpected token , in JSON at position 4342
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TextSize.json 
SyntaxError: Unexpected token , in JSON at position 3958
Failed JSON parse 
/c/x3d-code/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Button.json 
SyntaxError: Unexpected token , in JSON at position 3487


I am looking again at the files below, and the date they were modified 
also appears to be April 2018. Did I get an old zip? Would it be worth 
creating a new JSON zip so I can capture version 4.0 files?

Thanks!

If someone wants me to recreate the JSON, I would be willing to do that, 
but I'm a bit nervous about doing this multiple times on an SSD.


John

On 3/30/21 5:53 PM, John Carlson wrote:
> Indeed, it looks like at least one of these files was updated in 
> April. Ignore the below message, I will produce an alternative result.
>
> John
>
> On 3/30/21 5:48 PM, John Carlson wrote:
>> Low hanging fruit for JSON parsing (not schema validation) $ grep 
>> Failed results.txt|grep -v node_modules
>> Failed JSON parse 
>> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHuenemeDIS.json 
>> SyntaxError: Unexpected string in JSON at position 11316
>> Failed JSON parse 
>> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHueneme.json 
>> SyntaxError: Unexpected string in JSON at position 10445
>> Failed JSON parse 
>> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Locations/PanamaCityFlorida/PanamaCityGeo.json 
>> SyntaxError: Unexpected string in JSON at position 5198
>> Failed JSON parse 
>> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Weapons/UnderwaterMines/SphericalMinePrototype.json 
>> SyntaxError: Unexpected string in JSON at position 23534
>>
>>
>> These are things jsonlint should catch.   I am not sure about jshint 
>> or jslint.
>>
>>
>> These files are dated Jan 23 2021. Your files may be more up to date 
>> as I don't really know how to update Savage svn.
>>
>>
>> I am currently wondering if JSON files are checked into Savage folder 
>> or not.  I will re-expand my JSON zip and try again.
>>
>>
>> John
>>
>>
>>



More information about the x3d-public mailing list