[x3d-public] 4.0 generated X3D JSON schema

John Carlson yottzumm at gmail.com
Fri Jan 4 17:39:18 PST 2019


Here’s what I get for searching for HelloWorld in all my output:

javaresults.txt:json-parse json JSONObject["@version"] not a string. C:/x3d-code
/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/Hell
oWorldCommentedAlternativeEncoding.json                                         
javaresults.txt:json-parse json JSONObject["@version"] not a string. C:/x3d-code
/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes/Hell
oWorldCommentedOriginalEncoding.json                                            
jsonparseresults.txt:json-parse json JSONObject["@version"] not a string. C:/x3d
-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes
/HelloWorldCommentedAlternativeEncoding.json                                    
jsonparseresults.txt:json-parse json JSONObject["@version"] not a string. C:/x3d
-code/www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/HelloWorldScenes
/HelloWorldCommentedOriginalEncoding.js

Suggest you upgrade to org.everit.json.schema 1.8.0
    org.everit.json                                          
    org.everit.json.schema.parent                      
    1.8.0                                                    
Suggest: https://github.com/everit-org/json-schema/releases/tag/1.8.0

1.10.0 available, but untested, apparently.  Trying to upgrade now.  Upgraded to 1.10.0.  Problem with | in definition names, unnoticed before. Please comment on better name separator (below), or we will revert to 1.8.0

See http://json-schema.org/implementations.html for validators supporting draft-07

I am mainly supporting Ajv, but also report some errors from everit on occasion.   Attached are Ajv results from various autogenerated schemas as a gzip file

This appears to be a popular error now, reported to the console when running

https://github.com/coderextreme/x3dschema/validate.sh

$ cat err.txt |grep Caused                                                      
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
7: #/definitions/-NurbsCurve2D|ContourPolyline2DMFNode                          
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Caused by: java.net.URISyntaxException: Illegal character in fragment at index 2
1: #/definitions/-Sphere|Box|ConeSFNode                                         
Sent from Mail for Windows 10

From: Brutzman, Donald (Don) (CIV)
Sent: Friday, January 4, 2019 2:11 AM
To: John Carlson
Cc: X3D Graphics public mailing list
Subject: Re: 4.0 generated X3D JSON schema

On 1/2/2019 5:13 PM, John Carlson wrote:
> Here’s a pointer to the X3D 4.0  JSON schema, autogenerated:
> 
> https://raw.githubusercontent.com/coderextreme/x3dschema/master/x3d-4.0-JSONSchema.json
> 
> Version 3.3 available on request (see folder above).
> 
> By all means review.
> 
> Major changes in enumerations.
> 
> John

Thanks John, very interesting!  Let's roll right into this topic after regular teleconference Friday, if you can attend.

Am interested in learning more how you autogenerated it (X3DUOM perhaps) and what changes you have made to the current JSON schema.

http://www.web3d.org/specifications
http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json
http://www.web3d.org/specifications/X3dJsonSchemaDocumentation3.3/x3d-3.3-JSONSchema.html

Versions of JSON schemas (latest is still draft-07) are found at

	https://json-schema.org

X3D JSON pages are at

	X3D JSON Encoding
	http://www.web3d.org/wiki/index.php/X3D_JSON_Encoding

	X3DJSONLD: JavaScript Loader for X3D JSON
	https://github.com/coderextreme/X3DJSONLD

	X3D to JSON Stylesheet Converter
	http://www.web3d.org/x3d/stylesheets/X3dToJson.html

There is also a draft specification document in the github specification archive - members only.

	X3D/ISO-IEC 19776/ISO-IEC 19776-5/ISO-IEC 19776-5 V3.3/ISO-IEC 19776-5 V3.3 WD1/
	https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019776/ISO-IEC%2019776-5/ISO-IEC%2019776-5%20V3.3/ISO-IEC%2019776-5%20V3.3%20WD1

If memory serves, believe that draft and the 3.3 JSON schema was manually authored by Roy Walmsley.

Here's a comparison of prior Anchor definitions (3.3 and 4.0) with your new Anchor definition.  Looks like ordering of attribute definitions is a little different but otherwise quite similar.

=================================================================
{
	"$schema": "http://json-schema.org/draft-06/schema#",
	"title": "JSON Schema X3D V3.3",
	"description": "Experimental JSON Schema for X3D V3.3 ",
	"type": "object",
	"properties": {
		"X3D": {
			"$ref": "#/definitions/X3D"
		}
	},
	"required": [
		"X3D"
	],
	"additionalProperties": false,
	"definitions": {
		"Anchor": {
			"type": "object",
			"properties": {
				"@DEF": {
					"type": "string"
				},
				"@USE": {
					"type": "string"
				},
				"IS": {
					"$ref": "#/definitions/IS"
				},
				"@bboxCenter": {
					"type": "array",
					"minItems": 3,
					"maxItems": 3,
					"items": {
						"type": "number",
						"default": 0
					}
				},
				"@bboxSize": {
					"$ref": "#/definitions/@bboxSize"
				},
				"-children": {
					"$ref": "#/definitions/-children"
				},
				"@description": {
					"type": "string"
				},
				"-metadata": {
					"$ref": "#/definitions/-metadata"
				},
				"@parameter": {
					"type": "array",
					"minItems": 1,
					"items": {
						"type": "string"
					}
				},
				"@url": {
					"type": "array",
					"minItems": 1,
					"items": {
						"type": "string",
						"format": "uri-reference"
					}
				}
			},
			"additionalProperties": false
		},

=================================================================
x3d-4.0-JSONSchema.2019JAN3.json (your latest)

{
   "$schema": "http://json-schema.org/draft-07/schema#",
   "title": "JSON Schema X3D V3.3",
   "description": "Experimental JSON Schema for X3D V3.3 ",
   "type": "object",
   "properties": {
     "X3D": {
       "$ref": "#/definitions/X3D"
     }
   },
   "required": [
     "X3D"
   ],
   "additionalProperties": false,
   "definitions": {
     "-childrenStatements": {

[... snip ...]

     "Anchor": {
       "type": "object",
       "oneOf": [
         {
           "type": "object",
           "properties": {
             "@USE": {
               "type": "string"
             },
             "-children": {
               "type": "array",
           
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190104/9872390d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: results3.txt.gz
Type: application/x-gzip
Size: 4395 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20190104/9872390d/attachment-0001.tgz>


More information about the x3d-public mailing list