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

John Carlson yottzumm at gmail.com
Thu Apr 29 00:28:05 PDT 2021


If you want to check the data midstream, try:

System.out.print(loader.serializeDOM(loader.getX3DVersion(jsobj), 
document));

You'll want to pretty print the XML.

John

On 4/29/21 2:16 AM, John Carlson wrote:
> Don,
>
> Are we planing to do validation with ECMAScript SAI, and drop X3D JSON 
> schema?
>
> 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();
>
>
> Yes, I understand that there's  possibly a bug in this code 
> somewhere.  Someone filing an issue would be most comforting!
>
> https://github.com/coderextreme/X3DJSONLD/issues
>
> 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://www.web3d.org/standards
>>
>> 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



More information about the x3d-public mailing list