[x3d-public] JSON schema: type for IMPORT, EXPORT

Roy Walmsley roy.walmsley at ntlworld.com
Mon May 8 05:06:51 PDT 2017

Hi Don,


Here is a graphic of the JSON schema structure for IMPORT.



As you can see, it is an array, but an array of objects. This is also the structure listed in the draft JSON encoding at (see  http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#IMPORTPropertySyntax). However, comparison is useful against the ROUTE statement, which is not an array, but an object. Here it is:


And the draft text is at http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#ROUTEPropertySyntax. Now, note that the text talks about it being an optional property of some “-children” property arrays. So let us look at some of these:


*	For the Scene object, the “-children” property (http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#SceneChildrenPropertySyntax) includes ROUTE, IMPORT and EXPORT statements, among others.
*	For the Node object, the “-children” property, where it may optionally be added (http://www.web3d.org/documents/specifications/19776-5/V3.3/Part05/concepts.html#NodeChildrenPropertySyntax) includes ROUTE, IMPORT and EXPORT, among others
*	Referring to the JSON schema, the “-children” definition, equivalent to nodes derived from X3DChildNode, includes ROUTE,  IMPORT and EXPORT, among others.


Thus I conclude that wherever an IMPORT or EXPORT statement can be used, is (unless I have missed something) always in the context of an MFNode field, or else as a direct child of the Scene statement. Hence it is already part of an array, and therefore does not need to be an array in its own right. Therefore, I propose to remove the array portion from the JSON schema definition, if everyone is in agreement.


Thanks for spotting this and raising it.


All the best,








-----Original Message-----
From: Don Brutzman [mailto:brutzman at nps.edu] 
Sent: 08 May 2017 03:26
To: Roy Walmsley <roy.walmsley at ntlworld.com>; John Carlson <yottzumm at gmail.com>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: JSON schema: type for IMPORT, EXPORT


x3d-3.3-JSONSchema.json says


                                "IMPORT": {

                                                "type": "array",


                                "EXPORT": {

                                                "type": "array",


but likely should be structured similarly to


                                "ROUTE": {

                                                "type": "object",


Diagnostic: test scene X3dHeaderPrototypeSyntaxExamples.json attached, with excerpt:









{ "PositionInterpolator":








all the best, Don


Don Brutzman  Naval Postgraduate School, Code USW/Br        <mailto:brutzman at nps.edu> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170508/06971c9e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 11991 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170508/06971c9e/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 10158 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20170508/06971c9e/attachment-0003.png>

More information about the x3d-public mailing list