[x3d-public] summary of remaining JSON parse errors

Don Brutzman brutzman at nps.edu
Mon Feb 29 07:02:43 PST 2016


cc: list

Thanks for the summary and details, very helpful.  We are indeed getting closer.

This weekend I was able to clear up all of the warnings being reported by the X3dToJson.xslt stylesheet.  Updated output:
http://www.web3d.org/x3d/content/examples/build.json.out

Looking at these next.

On 2/26/2016 2:18 PM, John Carlson wrote:
> Some number formatting issues (need digit after .)
> Escaping issues
> ContainerField naming or object attribute value braces missing.
> ‘,’ value is missing.
> Bad source documents (not X3D).
> -metadata should be an array or a containerField.
>
> Annotated error report attached (with line numbers).

First one I'm not so sure about.  It appears happy with the construct \' in source, not clear how we should escape that.  Possibly \\ for \ character?

Source follows.  We need to think at the X3D level as well.  The \' is intended to output the apostrophe character in the X3D Javascript console, the ' characters are Javascript string delimiters.

X3D
     if (!animated) // output results
     {
         tracePrint ('<PositionInterpolator    DEF=\'CameraPositionInterpolator\'    key=\'' + stripBrackets(CameraPI.key) + '\' keyValue=\'' + stripBrackets(CameraPI.keyValue) + '\'/>');
         tracePrint ('<OrientationInterpolator DEF=\'CameraOrientationInterpolator\' key=\'' + stripBrackets(CameraOI.key) + '\' keyValue=\'' + stripBrackets(CameraOI.keyValue) + '\'/>');
     }

JSON
"        tracePrint ('<PositionInterpolator    DEF=\'CameraPositionInterpolator\'    key=\'' + stripBrackets(CameraPI.key) + '\' keyValue=\'' + stripBrackets(CameraPI.keyValue) + '\'/>');",

If you want to test also, the scene animates OK under InstantReality and BS Contact.  Conversion log:

C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.x3d processing with X3dToJson stylesheet
Script DEF=CameraScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=CameraShotScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=CameraMovementScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
Script DEF=OfflineRenderScript contains CDATA source-code text, copied as "#sourceText" using "strings" mode
C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.json processing with jslint
jslint:C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.json:718:1:JavaScript URL.
jslint:C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.json:867:53:Unexpected '\''.
jslint:C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.json:867:81:Unexpected '\''.
jslint:C:\x3d-code\www.web3d.org\x3d\content\examples\Basic/development//CameraPrototypes.json:867:91:Unexpected '\''.
[... etc. for all occurrences ...]
  
> And the 1280 GeoOrigin USE before DEF ones.

Those scenes are all fixed and checked in, server uploads later today.

John, any scenes in subdirectories like "_archive" or "save" are working drafts and do not need to pass testing.  Similarly those found in Java source subdirectories.  OK to look at them I guess but not expected to be workable at this point.

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
-------------- next part --------------
examples//Basic/development/CameraPrototypes.json
examples//Basic/development/SchemaTest.json
examples//Basic/development/ScriptSyntaxExample.json
examples//Basic/development/TestDiagnosticOverloadedChildNodes.json
examples//Basic/development/TestRegularExpressionChecks.json
examples//Basic/development/TestSchematronDiagnostics.json
examples//Basic/development/UnquotedTokensNavigationInfoAndFontStyle.json
examples//Basic/development/TextExamples.json
examples//Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/communicator/communicator.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/dolphin.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/hand.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/octopus.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/oni.json
examples//Basic/HumanoidAnimation/originals/LOA3ExampleSourceWithDiamondsOriginalBsContactExport.json
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/baby.json
examples//Basic/NURBS/originals/mobius.json
examples//Basic/NURBS/originals/nrbduck_0.json
examples//Basic/NURBS/originals/nurbs_patch_solid.json
examples//Basic/NURBS/originals/trimmed_nurbs_with_hole.json
examples//Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamples.json
examples//ConformanceNist/BindableNodes/Viewpoint/jump_false.json
examples//ConformanceNist/BindableNodes/Viewpoint/jump_true.json
examples//ConformanceNist/BindableNodes/Viewpoint/noviewpoint.json
examples//Savage/InstallingCortonaBrowserAsPowerpointControl_files/filelist.json
examples//Savage/InstallingCortonaBrowserAsPowerpointControl_files/pres.json
examples//Savage/Robots/UnmannedAirVehicles/ScanEagle.json
examples//Savage/Robots/UnmannedAirVehicles/SeaScan.json
examples//Savage/Robots/UnmannedSurfaceVehicles/SeaFox.json
examples//Savage/Robots/UnmannedSurfaceVehicles/SeaFoxOriginal.json
examples//Savage/Scenarios/CollisionUssGreenevilleMvEhimeMaru/CollisionUssGreenevilleMvEhimeMaru_files/filelist.json
examples//Savage/Scenarios/CollisionUssGreenevilleMvEhimeMaru/CollisionUssGreenevilleMvEhimeMaru_files/pres.json
examples//Savage/ShipsMilitary/DDG-ArleighBurke-UnitedStates/ArleighBurkeReadme_files/filelist.json
examples//Savage/ShipsMilitary/FFG-7OliverHazardPerry-UnitedStates/OliverHazardPerryFFG.json
examples//Savage/Tools/Visualization/pajekOriginals/2010-01-15newman.json
examples//Savage/Tools/Visualization/pajekOriginals/2010-02-12newman.json
examples//X3dForWebAuthors/Chapter01-TechnicalOverview/EmptySceneCoreProfile.json
examples//X3dForWebAuthors/Chapter02-GeometryPrimitives/originals/pixel_perfect.json
examples//X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharacters.json
examples//X3dForWebAuthors/Chapter15-Metadata/MetadataExamples.json
-------------- next part --------------
examples//Basic/development/CameraPrototypes.json
[Error: Parse error on line 865:
... results","    {","        tracePrint 
---------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

I can't see the error.  Appears in this code:

"",
"    if (!animated) // output results",
"    {",
"        tracePrint ('<PositionInterpolator    DEF=\'CameraPositionInterpolator\'    key=\'' + stripBrackets(CameraPI.key) + '\' keyValue=\'' + stripBrackets(CameraPI.keyValue) + '\'/>');",


examples//Basic/development/SchemaTest.json
[Error: Parse error on line 70:
... at translation":[10000.e-1,50,0.5],      
-----------------------^
Expecting 'EOF', '}', ',', ']', got 'undefined']

A digit must appear after the "." in JSON numbers.


examples//Basic/development/ScriptSyntaxExample.json
[Error: Parse error on line 119:
...          "@value":["\"","quote"] 
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']', got 'undefined']

\& is not a valid escape.  Consider using \\


examples//Basic/development/TestDiagnosticOverloadedChildNodes.json
[Error: Parse error on line 73:
...                    { "Material":      
-----------------------^
Expecting 'STRING', got '{']

Believed to be an error in the source document.  Two Material Nodes.


examples//Basic/development/TestRegularExpressionChecks.json
[Error: Parse error on line 99:
...     "@key":[0,0.250.5,0.75,1],        
-----------------------^
Expecting 'EOF', '}', ',', ']', got 'undefined']

Error in number format.


examples//Basic/development/TestSchematronDiagnostics.json
[Error: Parse error on line 805:
...     "@bboxCenter":[1a,2b,3c],         
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', ']', got 'undefined']

Error in number format. Hex?


examples//Basic/development/UnquotedTokensNavigationInfoAndFontStyle.json
[Error: Parse error on line 68:
...  { "#comment":"\\" (backslash quote) es
-----------------------^
Expecting 'EOF', '}', ':', ',', ']', got 'undefined']

Consider using &quot in comments;  As is, it's wrong.

examples//Basic/development/TextExamples.json
[Error: Parse error on line 68:
... don't think so","",\"he,said,\"Hi\""],
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

Error in stylesheet handling of MFStrings.


examples//Basic/HumanoidAnimation/save/NancyNativeTagsWrapped.json
[Error: Parse error on line 67:
...         "-children":[                 
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

              "-ErrorChildNodeFieldNameNotFound":[
                { "humanoidBody":
                    "-children":[
                      { "HAnimJoint":
                        {

There likely should be a { after humanoidBody.  Possible poor insertion of containerField.



examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/communicator/communicator.json
[Error: Parse error on line 17:
...            "-coord":                  
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

"-ErrorChildNodeFieldNameNotFound":[
                      { "XvlFaces":
                          "-coord":
                            { "Coordinate":
                              {
                                "@DEF":"COORD1",


There likely should be a { after XvlFaces.  Possible poor insertion of containerField.


examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/dolphin.json
[Error: Parse error on line 13:
...            "-coord":                  
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

Same as previous.


examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/hand.json
[Error: Parse error on line 13:
...            "-coord":                  
-----------------------^

Same as previous.


Expecting 'EOF', '}', ',', ']', got ':']
examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/octopus.json
[Error: Parse error on line 13:
...            "-coord":                  
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

Same as previous.


examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/oni.json
[Error: Parse error on line 13:
...            "-coord":                  
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

Same as previous.

examples//Basic/HumanoidAnimation/originals/LOA3ExampleSourceWithDiamondsOriginalBsContactExport.json
[Error: Parse error on line 96:
...                "IS": {                
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

     {
                        "-ErrorChildNodeFieldNameNotFound":[
                          { "Group":
                              "IS": {
                                  "connect": [

THere should be a -children, or a { after Group.


examples//Basic/LatticeXvl/javasrc/Lv_Java_v0_31/CodeBase/Demo/baby.json
[Error: Parse error on line 13:
...            "-coord":                  
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']


There likely should be a { after XvlFaces.  Possible poor insertion of containerField.


examples//Basic/NURBS/originals/mobius.json
[Error: Parse error on line 53:
...         "-geometry":                { 
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

 "-ErrorChildNodeFieldNameNotFound":[
          { "Shape":
              "-geometry":
                { "NurbsPatchSurface":

There should be a { After Shape, I think.


examples//Basic/NURBS/originals/nrbduck_0.json
[Error: Parse error on line 109:
...deFieldNameNotFound":[                 
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

"-ErrorChildNodeFieldNameNotFound":[
          { "Transform":
            {
              "@rotation":[1.0,0.0,0.0,-1.57],
              "@scale":[0.5,0.5,0.5],
              "-ErrorChildNodeFieldNameNotFound":[
                { "Shape":
                    "-ErrorChildNodeFieldNameNotFound":[
                      { "Appearance":
                          "-ErrorChildNodeFieldNameNotFound":[
                            { "Material":
                              {
                                "@diffuseColor":[0.760784,0.843137,0.196078],
                                "@shininess":0.22,
                                "@specularColor":[0.9,0.9,0.9]
                              }
                            }
                          ]
                      }
                    ],
                    "-ErrorChildNodeFieldNameNotFound":[
                      { "NurbsPatchSurface":
                        {

containerFields didn't get populated right.  { should follow Shape?

examples//Basic/NURBS/originals/nurbs_patch_solid.json
[Error: Parse error on line 53:
...         "-children":[                {
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

There should be a { after Shape.

examples//Basic/NURBS/originals/trimmed_nurbs_with_hole.json
[Error: Parse error on line 53:
...         "-children":[                {
-----------------------^
Expecting 'EOF', '}', ',', ']', got ':']

There should be a { after Group or -children should be left out.

examples//Basic/X3dSpecifications/X3dHeaderPrototypeSyntaxExamples.json
[Error: Parse error on line 295:
...       { "#comment":"alternative: Text s
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

I can't identify the issue here.

examples//ConformanceNist/BindableNodes/Viewpoint/jump_false.json
[Error: Parse error on line 529:
...e":                },                {
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got '}']


There is no value value for a field value attribute. (it's ',')

examples//ConformanceNist/BindableNodes/Viewpoint/jump_true.json
[Error: Parse error on line 527:
...e":                },                {
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got '}']

Same as previous.


examples//ConformanceNist/BindableNodes/Viewpoint/noviewpoint.json
[Error: Parse error on line 437:
...e":                },                {
----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got '}']

Same as previous.


examples//Savage/InstallingCortonaBrowserAsPowerpointControl_files/filelist.json
[Error: Parse error on line 1:

^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']

Empty file.  Not an X3D source.  Rename source file.


examples//Savage/InstallingCortonaBrowserAsPowerpointControl_files/pres.json
[Error: Parse error on line 1:

^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']

Empty file.  Not an X3D source.  Rename source file.


examples//Savage/Robots/UnmannedAirVehicles/ScanEagle.json
[Error: Parse error on line 170:
...                    { "MetadataString":
-----------------------^
Expecting 'STRING', got '{']

Metadata isn't being handled right.  -metadata should be an array, I guess.


examples//Savage/Robots/UnmannedAirVehicles/SeaScan.json
[Error: Parse error on line 141:
...                    { "MetadataString":
-----------------------^
Expecting 'STRING', got '{']

Same as previous.


examples//Savage/Robots/UnmannedSurfaceVehicles/SeaFox.json
[Error: Parse error on line 170:
...                    { "MetadataString":
-----------------------^
Expecting 'STRING', got '{']

Same as previous.


examples//Savage/Robots/UnmannedSurfaceVehicles/SeaFoxOriginal.json
[Error: Parse error on line 148:
...                    { "MetadataString":
-----------------------^
Expecting 'STRING', got '{']

Same as previous.


examples//Savage/Scenarios/CollisionUssGreenevilleMvEhimeMaru/CollisionUssGreenevilleMvEhimeMaru_files/filelist.json
[Error: Parse error on line 1:

^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']

Empty file. Source file is not .x3d, rename.


examples//Savage/Scenarios/CollisionUssGreenevilleMvEhimeMaru/CollisionUssGreenevilleMvEhimeMaru_files/pres.json
[Error: Parse error on line 1:

^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']

Empty file. Source file is not .x3d, rename.


examples//Savage/ShipsMilitary/DDG-ArleighBurke-UnitedStates/ArleighBurkeReadme_files/filelist.json
[Error: Parse error on line 1:

^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'EOF']

Empty file. Source file is not .x3d, rename.


examples//Savage/ShipsMilitary/FFG-7OliverHazardPerry-UnitedStates/OliverHazardPerryFFG.json
[Error: Parse error on line 212:
...                    { "MetadataString":
-----------------------^
Expecting 'STRING', got '{']

Metadata isn't being handled right.  -metadata should be an array, I guess.


examples//Savage/Tools/Visualization/pajekOriginals/2010-01-15newman.json
[Error: Parse error on line 9:
...         "@content":"3. C:\Users\Elaine\
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

Bad escapes.  Consider using \\.


examples//Savage/Tools/Visualization/pajekOriginals/2010-02-12newman.json
[Error: Parse error on line 9:
...         "@content":"27. C:\Users\Elaine
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

Bad escapes.  Consider using \\.


examples//X3dForWebAuthors/Chapter01-TechnicalOverview/EmptySceneCoreProfile.json
[Error: Parse error on line 93:
...                    { "MetadataDouble":
-----------------------^
Expecting 'STRING', got '{']

Metadata isn't being handled right.  -metadata should be an array, I guess.


examples//X3dForWebAuthors/Chapter02-GeometryPrimitives/originals/pixel_perfect.json
[Error: Parse error on line 9:
...         "@content":"C:\www.web3d.org\x3
-----------------------^
Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined']

Bad escapes.  Consider using \\.


examples//X3dForWebAuthors/Chapter02-GeometryPrimitives/TextSpecialCharacters.json
[Error: Parse error on line 91:
... with backslash: \\""                },
-----------------------^
Expecting 'EOF', '}', ':', ',', ']', got 'undefined']

Bad escape.  Not sure what to do.


examples//X3dForWebAuthors/Chapter15-Metadata/MetadataExamples.json
[Error: Parse error on line 156:
...       },          { "MetadataDouble":
----------------------^
Expecting 'STRING', got '{']

Metadata isn't being handled right.  -metadata should be an array, I guess.




More information about the x3d-public mailing list