[x3d-public] JSON parsing X3D archive, X3dToJson.xslt issues.
John Carlson
yottzumm at gmail.com
Sun May 23 22:14:41 PDT 2021
XmpMetadataEmbedded.json:
{ "MetadataSet":
{
"@name":"namespaces",
"-metadata":
{ "MetadataString":
{
"@name":"xmlns:rdf",
"@value":["http://www.w3.org/1999/02/22-rdf-syntax-ns#"]
}
},
{ "MetadataString":
{
"@name":"xmlns:dc",
"@value":["http://purl.org/dc/elements/1.1/"]
}
},
{ "MetadataString":
{
"@name":"xmlns:xmp",
"@value":["http://ns.adobe.com/xap/1.0/"]
}
}
}
},
Appears that -metadata: is not an array, as perhaps it should be? What
do you think? I believe X3DUOM says SFNode for -metadata. No
containerFields come into play from the XML, as far as I can tell.
Perhaps there should be some containerFields that use "value" as a
container field name in XML? Or should we change X3dToJson.xslt to go
along with possible X3dToJava.xslt moving up "addValue" or use default
containerField as value.
SplitChannels.json:
Two Materials next to each other when there only should be one in XML.
SpatialAudioCameraAnimation.json:
Error is similar to SplitChannels.json error. Found in XML prior to
conversion to JSON.
ScannerMetadataExample33.json:
Two -children: [] arrays below Scene. "Appears" to be an issue with
X3dToJson.xslt
Will report on Savage after redoing parsing.
John
On 5/23/21 11:45 PM, John Carlson wrote:
> Result of testing JSON parsing (not schema validation) on X3D archive
> (older version of Savage). Not sure why there's a difference for
> Scanning folder. I will attempt to get a fresh version of Savage.
>
> John
>
> $ grep Failed results.txt |grep -v originals|grep -v Xvl|grep -v
> development
> Failed JSON parse
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/XmpMetadataEmbedded.json
> SyntaxError: Unexpected token { in JSON at position 5705
> Failed JSON parse
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.json
> SyntaxError: Unexpected token { in JSON at position 6796
> Failed JSON parse
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SpatialAudioCameraAnimation.json
> SyntaxError: Unexpected token T in JSON at position 3420
> 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
>
>
> $ grep parse javaresults.txt |grep -v HelloWorld
> json-parse json Expected a ':' after a key at 6302 [character 24 line
> 181]
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter15Metadata/XmpMetadataEmbedded.json
> json-parse json Expected a ':' after a key at 7275 [character 31 line
> 193]
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SplitChannels.json
> json-parse json Expected a ':' after a key at 8735 [character 37 line
> 240]
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/AudioSpatialSound/SpatialAudioCameraAnimation.json
> json-parse json Duplicate key "-children" at 21909 [character 20 line
> 537]
> /c/x3d-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/Scanning/ScannerMetadataExample33.json
> json-parse json Expected a ',' or ']' at 11317 [character 34 line 260]
> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHuenemeDIS.json
> json-parse json Expected a ',' or ']' at 10446 [character 34 line 241]
> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Scenarios/LimitedObjectiveExperimentPortHueneme/LimitedObjectiveExperimentPortHueneme.json
> json-parse json Expected a ',' or ']' at 5199 [character 30 line 178]
> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Locations/PanamaCityFlorida/PanamaCityGeo.json
> json-parse json Expected a ',' or ']' at 23535 [character 31 line 523]
> /c/x3d-code/www.web3d.org/x3d/content/examples/Savage/Weapons/UnderwaterMines/SphericalMinePrototype.json
>
More information about the x3d-public
mailing list