[x3d-public] Rubik revisited (again!)

John Carlson yottzumm at gmail.com
Mon Oct 25 09:13:30 PDT 2021


I decided to let loose the new JSON validator/schema on my local files.

I got the following:

~/X3DJSONLD/src/main/schema$ node ~/x3dvalidate/x3dvalidate.js 
../data/*.json 2>&1 |grep Error

Error reading ../data/AllAudioGraphNodesTest.json
Error reading ../data/AllAudioGraphNodesTest.new.json
Error reading ../data/Filters.json
*Error reading ../data/rubik2x2x2.json **
**Error reading ../data/rubikcoord.json *
Error reading ../data/SpatialAudioCameraAnimation.json
Error reading ../data/SpatialAudioCameraAnimation.new.json


The audio files seem to be a well known quantity, as previously reported 
on this email list.

For the other files, the rubik files in particular, there are some 
specific errors that may need to be added to X3DUOM, not sure.  As 
previously noted, the schema reports that the IS is not an allowed node 
below fieldValue.  I'm not sure where we left putting IS below 
fieldValue?  I thought we voted in favor of putting IS below fieldValue, 
but I'm not seeing it in X3DUOM yet (Am I missing something?).   
Attaching .x3d.

I realize that the .x3d does not pass X3D validator.  There may be other 
issues with the XML that are not legal.  One may attempt to convert the 
XML to JSON with X3D-Edit, I believe.

Note: freewrl seems to be the best viewer for the the attached file.  I 
tried X3DJSONLD, FreeWRL and view3dscene.   I'm still working on web 
browsing JSON validation.  Someone with experience creating bundles from 
Node.js modules could help a bit.  Or otherwise getting Ajv2020-12 to 
work in a browser.

JSON Schema validation of rubik2x2x2 file (other is similar):

~/X3DJSONLD/src/main/schema$ node ~/x3dvalidate/x3dvalidate.js 
../data/rubik2x2x2.json
Can only validate version 4.0 presently. Switching version to 4.0.
Loading schema
Parsing schema
Adding schema
Schema 4.0 added
Schema 4.0 compiled
================================================================================
File: ../data/rubik2x2x2.json
Error reading ../data/rubik2x2x2.json
  keyword: required
  instancePath: 
/X3D/Scene/-children/3/ProtoDeclare/ProtoBody/-children/0/Transform
  message: must have required property @USE
  params: {"missingProperty":"@USE"}
  file: ../data/rubik2x2x2.json
  version: 3.3

  keyword: required
  instancePath: 
/X3D/Scene/-children/3/ProtoDeclare/ProtoBody/-children/0/Transform/-children/0/ProtoInstance
  message: must have required property @USE
  params: {"missingProperty":"@USE"}
  file: ../data/rubik2x2x2.json
  version: 3.3

  keyword: additionalProperties
  instancePath: 
/X3D/Scene/-children/3/ProtoDeclare/ProtoBody/-children/0/Transform/-children/0/ProtoInstance/fieldValue/1
  message: must NOT have additional properties
  params: {"additionalProperty":"IS"}
  file: ../data/rubik2x2x2.json
  version: 3.3

  keyword: oneOf
  instancePath: 
/X3D/Scene/-children/3/ProtoDeclare/ProtoBody/-children/0/Transform/-children/0/ProtoInstance
  message: must match exactly one schema in "oneOf"
  params: {"passingSchemas":null}
  file: ../data/rubik2x2x2.json
  version: 3.3

  keyword: oneOf
  instancePath: 
/X3D/Scene/-children/3/ProtoDeclare/ProtoBody/-children/0/Transform
  message: must match exactly one schema in "oneOf"
  params: {"passingSchemas":null}
  file: ../data/rubik2x2x2.json
  version: 3.3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211025/fbccccc8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rubik2x2x2.x3d
Type: model/x3d+xml
Size: 6032 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211025/fbccccc8/attachment.x3d>


More information about the x3d-public mailing list