[x3d-public] Bug in Savage/Scenarios X3D XML Examples (likely). Not producing valid JSON

Don Brutzman brutzman at nps.edu
Tue Apr 13 09:51:17 PDT 2021


I am not finding these errors in published versions at

* https://savage.nps.edu/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHuenemeDISIndex.html

On 4/11/2021 8:49 PM, John Carlson wrote:
> 
> X3dToJson.xlst appears to be generating a bad JSON string array for
> NavigationInfo @type?
> 
> Original X3D XML looks like:
> 
> LimitedObjectiveExperimentPortHuenemeDIS.x3d: <NavigationInfo speed='10'
> type='EXAMINE" "FLY" "ANY' visibilityLimit='30000'/>
> LimitedObjectiveExperimentPortHueneme.x3d:    <NavigationInfo
> avatarSize='2 1.6 .75' speed='10' type='EXAMINE" "FLY" "ANY'
> visibilityLimit='30000'/>
> 
> There are other, different examples in the same folder that used the old
> way of doing an MFString.
> 
> I'm not sure what a valid XML MFString is any more (see the type
> attribute in both cases), please don't direct me to a web site, just
> output good JSON, thanks!
> 
> No obvious error or warning noted in meta.
> 
> Note, I have begun stripping off "/c/x3d-code/https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.web3d.org%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C63729054388e483d38fd08d8fd6603b7%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637537962498006664%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=6k4Ns7KqXQ1GriJHdN%2BifC0IC8lYfnqlS5whZNEeq9o%3D&reserved=0" fromthe
> file names I post in order that a good filename is retained. Let me know
> if this is working.
> 
> Maybe instead of being known as QA Specialist, I should be known as a
> Errorist?  Lol!
> 
> John
> 
> $ jsonlint
> x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHueneme.json
> Error: Parse error on line 241:
> ... "@type":["EXAMINE" "FLY" "ANY"],
> -----------------------^
> Expecting 'EOF', '}', ':', ',', ']', got 'STRING'
>     at Object.parseError
> (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:55:11)
>     at Object.parse
> (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:132:22)
>     at parse (/usr/local/lib/node_modules/jsonlint/lib/cli.js:82:14)
>     at main (/usr/local/lib/node_modules/jsonlint/lib/cli.js:135:14)
>     at Object.<anonymous>
> (/usr/local/lib/node_modules/jsonlint/lib/cli.js:179:1)
>     at Module._compile (internal/modules/cjs/loader.js:1138:30)
>     at Object.Module._extensions..js
> (internal/modules/cjs/loader.js:1158:10)
>     at Module.load (internal/modules/cjs/loader.js:986:32)
>     at Function.Module._load (internal/modules/cjs/loader.js:879:14)
>     at Function.executeUserEntryPoint [as runMain]
> (internal/modules/run_main.js:71:12)
> 
> 
> 
> $ jsonlint
> x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHuenemeDIS.json
> Error: Parse error on line 260:
> ... "@type":["EXAMINE" "FLY" "ANY"],
> -----------------------^
> Expecting 'EOF', '}', ':', ',', ']', got 'STRING'
>     at Object.parseError
> (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:55:11)
>     at Object.parse
> (/usr/local/lib/node_modules/jsonlint/lib/jsonlint.js:132:22)
>     at parse (/usr/local/lib/node_modules/jsonlint/lib/cli.js:82:14)
>     at main (/usr/local/lib/node_modules/jsonlint/lib/cli.js:135:14)
>     at Object.<anonymous>
> (/usr/local/lib/node_modules/jsonlint/lib/cli.js:179:1)
>     at Module._compile (internal/modules/cjs/loader.js:1138:30)
>     at Object.Module._extensions..js
> (internal/modules/cjs/loader.js:1158:10)
>     at Module.load (internal/modules/cjs/loader.js:986:32)
>     at Function.Module._load (internal/modules/cjs/loader.js:879:14)
>     at Function.executeUserEntryPoint [as runMain]
> (internal/modules/run_main.js:71:12)
> 
> 
> This pretty much concludes all of the X3D JSON parsing errors I found
> with my tools.
> 
> 
> I think the X3D examples are pretty much good to go except for the last
> 5 problems noted.
> 
> 
> We are now progressing into how the X3D JSON schema is documented.
> 
> John
> 

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list