[x3d-public] Problem with JSON/XML for SplitChannels.json

John Carlson yottzumm at gmail.com
Thu Oct 14 15:13:42 PDT 2021


x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.json

This JSON file still has more than one Material node, which is producing 
an array without [] around it, since the -material field is an SFNode, 
not an MFNode.

jsonlint 
/c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.json
Error: Parse error on line 183:
...                    { "Material":
-----------------------^
Expecting 'STRING', got '{'
     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:1072:14)
     at Object.Module._extensions..js 
(internal/modules/cjs/loader.js:1101:10)
     at Module.load (internal/modules/cjs/loader.js:937:32)
     at Function.Module._load (internal/modules/cjs/loader.js:778:12)
     at Function.executeUserEntryPoint [as runMain] 
(internal/modules/run_main.js:76:12)

The JSON file was produced on Oct 12.

Here's a snippet of the JSON failing:

              {
                                 "-material":
                                   { "Material":
                                     {
"@diffuseColor":[0.345,0.345,0.882]
                                     }
                                   },
                                   { "Material":
                                     {
                                       "@ambientintensity":0.0933,
                                       "@diffusecolor":[1,1,1],
                                       "@emissivecolor":[0,0,0],
                                       "@shininess":0.51,
"@specularcolor":[0.46,0.46,0.46]
                                     }
                                   }
                               }

Two Material appearances start on lines 43 and 73 of 
x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.x3d

Thanks!

John





More information about the x3d-public mailing list