[x3d-public] JSON schema or ECMAScript API first?

Don Brutzman brutzman at nps.edu
Sat May 1 22:27:53 PDT 2021


On 4/29/2021 12:16 AM, John Carlson wrote:
> Don,
> 
> Are we planing to do validation with ECMAScript SAI, and drop X3D JSON schema?

We are planning on doing validation with JSON schema.

We will then look at X3D ECMAScript standard and decide on whether to create a dedicated open source API.

This has long been the hoped-for plan with your X3DJSONLD library, stabilize on patterns and then support X3D specification.

> Since you accepted X3DJSONLD into X3DJSAIL, you need X3D JSON schema? Can't you use validate()?  Java code below:
> 
>                  X3DJSONLD loader = new X3DJSONLD();
> 
>                  JsonObject jsobj = loader.readJsonFile(new File("../examples/HelloWorldProgramOutput.json"));
>                  Document document = loader.loadJsonIntoDocument(jsobj);
>                  X3DLoaderDOM  xmlLoader = new X3DLoaderDOM();
>                  X3D X3D0 = (X3D)xmlLoader.toX3dModelInstance(document);
> 
>                  X3D0.validate();

Seems plausible.  Not clear from your snippet what the classes are.

We want JSON schema for many reasons, this is just one.  All validation and quality assurance is good.

> Yes, I understand that there's  possibly a bug in this code somewhere. Someone filing an issue would be most comforting!

Much more comforting is to create a test case corresponding to code, and confirmed-correct outputs checked into version control, then you know that something works and stays working.

Hoping to meet monday if time permits.

> Thanks!
> 
> John
> 
> On 4/28/21 10:52 PM, Don Brutzman wrote:
>> On 4/11/2021 9:34 PM, John Carlson wrote:
>>>
>>> Don,
>>>
>>> Can we work together to bring X3dToES5.xslt up-to-date with X3DJSAIL
>>> class names (those without ..."Object")?
>>
>> Hi John.  Apologies but I do not understand the utility of such a conversion.
>>
>> a. X3dToJson.xslt makes sense as we gradually finalize the X3D JSON encoding by autogenerating and confirming correctness of an X3D JSON Schema (draft 07 is current target).
>>
>> b. We have your X3DJSONLD code but, to my knowledge, we do not have any kind of codebase that matches the X3D ECMAScript language binding.
>>
>> * ISO/IEC CD 19777-1:2014 V3.3     X3D Language Bindings : ECMAScript (JavaScript)
>>   found at https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.web3d.org%2Fstandards&data=04%7C01%7Cbrutzman%40nps.edu%7C1e7e88f9be51496ba61308d90adedf65%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637552775218168213%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ACqjQZXOuwJMBzsIOrMNA30pSlGwEiB1leuAd8Fg5Pw%3D&reserved=0
>>
>> c. People (like you) are welcome to work on anything they want. We have worked so hard to create/autogenerate a fully rigorous X3D Unified Object Model (X3DUOM) with complete type and hierarchy information.  We are generating typesafe Java (X3DJSAIL) and typesafe Python (X3DPSAIL) already.
>>
>> Not a new plan: let's do X3D JSON Schema autogeneration first, and then a matching X3D Javascript library, then update 19777-1.
>>
>> d. Dick Puk and I keep finding lots of time-consuming issues to resolve with X3D4 in Mantis for the imminent ISO ballot.  This is a necessary delay, unfortunately.
>>
>> Good news is that no major issues or flaws have yet been identified... we will keep working on getting things exactly right.
>>
>>> This is used with old Nashorn code.  I don't know if anyone is using it,
>>> so it may not be worth the effort.  Our efforts are probably better
>>> spent on creating a node/es6x3d stylesheet/typesafe library.
>>
>> Nashorn is dead.  Please advise if I can remove it completely from X3DJSAIL version control... If you need anything there, please copy/remove it.
>>
>> We have been moving slowly but moving, through steps a-b-c-d above. Other X3D4 updates await as well.  I certainly have no time for anything other than X3D4 critical path, it will keep us busy all year.
>>
>>> I'm running a new version through my donlocal.sh bash script.  We shall see!
>>>
>>> Thanks!
>>>
>>> John
>>
>> Thanks for your efforts.
>>
>> all the best, Don
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fweb3d.org%2Fmailman%2Flistinfo%2Fx3d-public_web3d.org&data=04%7C01%7Cbrutzman%40nps.edu%7C1e7e88f9be51496ba61308d90adedf65%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637552775218168213%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=E9W1%2Fj0w6%2FIIzVKbjtSlk20mRr0jIG5xPHB%2FIYGr8RI%3D&reserved=0

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



More information about the x3d-public mailing list