[x3d-public] Bug in Savage/Scenarios X3D XML Examples (likely). Not producing valid JSON
Don Brutzman
brutzman at nps.edu
Thu Apr 15 08:24:54 PDT 2021
Every change to every example to every archive is checked in before publishing on the website.
So you should refresh your checked-out archives before testing.
The direct link to each version archive is found at the bottom or each example archive page, also found on X3D Resources under Examples.
* https://www.web3d.org/x3d/content/examples/X3dResources.html#Examples
* https://savage.nps.edu/Savage
* https://savage.nps.edu/Savage/#information
> Online at
>
> https://savage.nps.edu/Savage
>
> Master source-code model archive is under subversion control at
>
> https://gitlab.nps.edu/Savage/Savage
As ever, trouble reports welcome. If a known problem or limitation exists in a scene, we'll add a meta tag info/hint/warning/error to the original .x3d model and it will eventually be reflected in all other published formats as well.
On 4/13/2021 10:07 AM, John Carlson wrote:
>
> Okay! Generally I work off checked in files, I don’t know of any “released” branches on savage.nps.EDI
>
> John
>
> On Tue, Apr 13, 2021 at 11:51 AM Don Brutzman <brutzman at nps.edu <mailto:brutzman at nps.edu>> wrote:
>
> I am not finding these errors in published versions at
>
> * https://savage.nps.edu/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHuenemeDISIndex.html <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 <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.web3d.org%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C9e738e6733d74478c8a308d8fe9eb01a%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637539304816642034%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=4Ekox8N7L7pvdu%2BtI8Btoiye21IaziMWo6QqaWp3cvQ%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 <mailto: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 <http://faculty.nps.edu/brutzman>
>
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