[x3d-public] Code for generating X3D JSON schema, draft06

John Carlson yottzumm at gmail.com
Wed Mar 14 11:07:06 PDT 2018


My generated versions and Roy’s handcrafted versions are very different I think.   In particular, mine support @USE with oneOf in many more cases. I don’t think it would serve a good purpose to compare the two.  But it might be useful to compare my draft06 hand crafted version of Roy’s schema with his version.  The draft04 version is a couple of patches behind.  Here is my handcrafted draft06 version:  https://github.com/coderextreme/x3dschema/blob/master/x3d-6.0-JSONSchema.json and here: https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/schema/x3d-6.0-JSONSchema.json

My generated schema is the 3.3 version in the same folders, I hope.  Otherwise, it’s the 5.1 schema (more reliable).   The original generation is 5.0, then I jsonlint it to format it and place it in 5.1 and 3.3.   The draft04 is the 3.3 backup.

If you want me to produce a diff of these things, I can, but perhaps searching the through the email list (for around October 26th) would reveal it.  It may be better for me to produce a diff, but I’ve been a bit miffed that I’ve been ignored, so I’m playing Little Johnny Green instead of Big John Stout right now 😊😊😊.  I’ll grow up eventually and produce the diffs.

I can recommend the diff available with Cygwin or git bash, or you can copy over files and produce diffs with svn diff or git diff.  Or I’m sure your IDE should provide a diff tool if you look for it.

-w with diff ignores whitespace, if that’s an issue with EOLs.

John

Sent from Mail for Windows 10

From: Don Brutzman
Sent: Wednesday, March 14, 2018 1:44 PM
To: John Carlson
Cc: x3d-public at web3d.org
Subject: Re: Code for generating X3D JSON schema, draft06

John, this sounds great.

Wondering, for your generated JSON schema, can you diff it with our version-control JSON Schema by Roy? Looking at a diff (or simply a diff excerpt maybe) would help us focus on what changes might be needed.  That also might help us diagnose why some of the example test scenes aren't validating.

Note that the current X3D JSON schema we've published is JSON version 04, not 06 (i.e. http://json-schema.org/draft-04/schema#)

Online at
	http://www.web3d.org/specifications/x3d-3.3-JSONSchema.json

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

	https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/specifications/x3d-3.3-JSONSchema.json


On 3/12/2018 11:11 AM, John Carlson wrote:
> Here’s my complete code for generating X3D JSON schema, in accordance with draft06.
> 
> I do not know if the schema is right or not, but I have checked it against x3d resources examples, and have a few questions as to what the standard is.  It has different complaints than Roy’s schema in some cases, which we need to resolve.
> 
> https://github.com/coderextreme/X3DJSONLD/blob/master/src/main/python/etgenerateJSONschema.py
> 
> Check the file being generated at the bottom of the source code, and paths to the object model etc. before running.
> 
> Good luck!
> 
> I think this would be fairly easily be made into a stylesheet, if you like.
> 
> You may check this into the sourceforge repository under some development branch, or work off my X3DJSONLD repository.
> 
> 
> I don’t recall if I sent you this Don, but there are ways with Ajv-errors to embed error messages in the schema, which we might use.  I am not sure what’s in the standard.
> 
> John
> 


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 --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180314/ba1f3dad/attachment-0001.html>


More information about the x3d-public mailing list