[x3d-public] Deprecating X3D JSON Schema

John Carlson yottzumm at gmail.com
Tue Dec 19 23:15:37 PST 2023


First off, I have no plans to deprecate X3D JSON.  My goal is to remove
roadblocks to standardization.  Currently, the roadblock is “JSON Schema.”
 Effort has been applied to replace JSON Schema with XML Schema in Java.
Further effort could be applied to do similar for VRML with a DOM parser
(but please use view3dscene or similar ).

Very long and rambling.  More musing than anything.  I tried to address the
high points from Don’s message.  I do want to put in a plug for X3DJSAIL as
I’ve found it invaluable for XML, XSD (with the inclusion of Xerces),  DOM
and scenegraph validation.

Don, as previously mentioned, MicroSoft/GitHub is now prominently displayed
on the json-schema.org website, and this does not bode well for JSON schema
standardization, except as something used exclusively with Microsoft
products.  I am currently seeing XSD based DOM validation in the browser as
a non-starter as well.  I don’t even see that MicroSoft is supporting XSD
DOM validation in newer browsers.  Someone change my mind?  Are we getting
an ECMAschema?

I realize that document validation in the web browser is probably a bad
idea anyway, and there looks to be XSD validation in Node.js.  I’m
 thinking WASM-based validation for DOM is also a non-starter, but there
may be more developments with WASM and DOM.

Right now Java XSD validation of JSON looks very promising, with code
already working.  I suggest this is a good pathway forward, and already has
more working validators in other Web3d Consortium software, like
X3DJSAIL/Xerces, which I use for XSD validation .  My Java JSON to DOM code
needs extensive testing;  I do a lot of validation of HAnim, and this is
why I need ulimit/llimit default values removed from X3dToJson.xslt and
X3dTidy.xslt output.  I suggest the creation of the equivalent
JsonToX3d.xslt usable with Saxonica libraries.  We need lots of examples of
JSON without Script nodes to do things properly.  I already have some crude
scripts working for comparing XML in to XML out.  Better round-tripping
tools (SAX-based) are desired.  There will probably be updates required to
X3dTidy.xslt in the future to support roundtrips.  I realize there’s an X3D
canonicalizer,  but I don’t think I currently have the disk space—something
in memory would be great.  I probably have more memory than disk space.

I am speaking of Holger’s x3d-tidy to convert XML to JSON, not a
stylesheet.  Sorry I didn’t add clarification.  I have found some potential
head and Transform children ordering issues in x3d-tidy output.  I don’t
have a solution in X3DJSONLD yet.  I have not yet received notification
that my x3d-tidy issues are being addressed, probably due to the holidays.

If the Web3D Consortium or Khronos or MSF wants to standardize JSON schema,
that might actually work.  I am open to discussing this on Zoom.
Unfortunately, I feel unable to work on such a project, unless I can
participate using  an iPhone editor.  I can be an “expert” observer if
needed, but I’m guessing there’s many glTF people too.

My JSON schema generators already use X3DUOM pretty much exclusively.  I
don’t really have any templates yet.  Python code, yes.  I do have a Python
program that prints out English rules.  As Don often tells me, we need
mappings.  Ideally, I could write a program to create mappings between
X3DUOM and JSON Schema.  Probably it would be easy to pull nodes out of
X3DUOM and equivalent nodes out of my “templates.”  That is actually a
really good idea.  Don, let me know if this seems like an agreeable path
forward for JSON and JSON Schema.


We have had discussions in zoom calls that didn’t go anywhere already.  My
suggestions to use X3DJSAIL for JSON validation were roundly rejected.
Perhaps X3D ECMAScript SAIL would be a good place to add JSON validation.
I do have some python code which could be used to base a validator on—from
my JSON to Python work.  I do realize that sensitive information is more
likely to be disclosed in more private settings.

What I am proposing is a way forward without any JSON schema
standardization, yet relying on XML/XSD Schema validation in tools like
Xerces (by way of the X3DJSAIL library archive jar).

I am not seeing Python JSON schema validation as usable in any production
or batch scenario.  Perhaps with draft 07 of the JSON schema standard.  Try
validating and see!

Ajv remains my go to solution for JSON schema validation in the browser.  I
suggest supporting this project, but there are difficulties implementing in
the browser, and not for the light of heart, last I checked.  If someone
needs help, let me know.  X3DJSONLD would be the place to start.

Overall, I suggest that we try to reduce the amount of code we have to
maintain for JSON, and putting effort where it’s needed, particularly in
Blender or another authoring system (X3D-Edit) that could attract
participants.  I don’t see Blender as an HAnim authoring system at this
time, but I’m still a Blender noob.  I’m sure there’s a lot more we could
do in Blender that isn’t related to HAnim (examples, please.  I plan on
working on this next year).  Also, I’m well on the way to adding animation
dope sheets (as a follow-on to animation chaining—thanks Andreas, Joe and
Michalis) to X3D-Edit in my Java Jaminate project.  Participation (I could
use some XML people) under an Apache license (same as NetBeans) is welcome!

https://github.com/coderextreme/jaminate

I know the X3D archive is important as a teaching tool, but I feel the XML
should be de-emphasized.  Designers want to see eye-candy, not a bunch of
XML, I suggest 3D galleries of Inlines and lists of Viewpoints with Anchors
to source code.  Developers have already moved past XML to stuff like JSX.

I do feel that an XML-like parser could be added to VRML, which might make
XSLT useful for manipulating VRML.  DOM probably won’t cut it for large
files though, so operating with SAX-like or StAX-like parsers and
XPath/XQuery are probably indicated for VRML.

John

On Tue, Dec 19, 2023 at 9:16 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> John, sorry but I just am not understanding your message.
>
>
>
> X3dTidy.xslt is a stylesheet that fixes up .x3d files.
>
>
>
> “Deprecation” is a term used when a feature is expected to be removed from
> a language or API.
>
>
>
> JSON encoding validated by JSON schema is part of our plan for the coming
> year, as part of a new specification.
>
>
>
> We have long been waiting for JSON Schema draft to become an IETF
> standard, and also waiting for supporting Java tools that work so that we
> might apply to our X3D Examples.
>
>
>
> When we can finally go forward, we can automate production of your draft
> JSON Schema templates using X3DUOM for exactness and long-term stability.
>
>
>
> If the JSON schema draft is frozen, we might consider doing all this in
> 2024 sometime.
>
>
>
> None of this is new information.  If it would help everyone’s shared
> understanding to discuss these necessary steps together on a regular Friday
> X3D Working Group call, am happy to do so.
>
>
>
> Thanks for willingness to advance JSON Schema for X3D, when we can
> accomplish that successfully.
>
>
>
> 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
> https://faculty.nps.edu/brutzman
>
>
>
> *From:* x3d-public <x3d-public-bounces at web3d.org> *On Behalf Of *John
> Carlson via x3d-public
> *Sent:* Tuesday, December 19, 2023 6:12 PM
> *To:* X3D Graphics public mailing list <x3d-public at web3d.org>
> *Cc:* John Carlson <yottzumm at gmail.com>
> *Subject:* [x3d-public] Deprecating X3D JSON Schema
>
>
>
> I plan on deprecating X3D JSON Schema in favor of XML Schema as soon as
> x3d-tidy outputs JSON in correct order (or I modify X3DJSONLD) and I figure
> out how to validate DOM in ECMAScript.  This has been accomplished in Java,
> so I’m hoping this will be easy in ECMAScript.  If someone wants to donate
> code to the cause, welcome!
>
>
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231220/80f6badd/attachment.html>


More information about the x3d-public mailing list