[x3d-public] X3DJSAIL/X3DJSONLD.java how to fix JsonConversion for modules.
John Carlson
yottzumm at gmail.com
Sat Apr 3 11:47:25 PDT 2021
Compilation and classpath for X3DJSAIL/X3DJSONLD loading of JSON:
/c/x3d-code/www.web3d.org/x3d/stylesheets/java/src$ javac -cp
../jars/X3DJSAIL.4.0.full.jar:../lib/javax.json-api-1.0.jar
net/coderextreme/*java
/c/x3d-code/www.web3d.org/x3d/stylesheets/java/src$ java -cp
../jars/X3DJSAIL.4.0.full.jar:.:../lib/javax.json-api-1.0.jar
net.coderextreme.JsonConversion
[snip]
Note, loads JSON via DOM (X3DLoaderDOM in X3DJSAIL).
There are "issues" with X3DLoaderDOM, I think. It appears to be
something with Java modules, and I am only a tiny bit familiar with
modules--haven't coded any modules.
So path forward appears to be someone to fix my code to use modules, or
I learn modules.
But yeah, if someone does another JSON loader in Java, we can follow the
pattern in python!
Another path forward is to check DOM output from X3DJSONLD.java, as
"printed" by net.coderextreme.JsonConversion
John
On 4/3/21 1:22 PM, John Carlson wrote:
>
>>> We already have XML and JSON parsing for Java.
>>
>> X3D JSON is a TODO item.
>>
>> * X3D Java Scene Access Interface Library (X3DJSAIL) Conversions
>> https://www.web3d.org/specifications/java/X3DJSAIL.html#Conversions
>>
> Here's a path forward!
>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/src/net/coderextreme/X3DJSONLD.java
>
>
> Plus sample conversion (must run in correct folder,
> /c/x3d-code/www.web3d.org/x3d/stylesheets/java/src), inputs/outputs
> from/to ../examples:
>
> https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/java/src/net/coderextreme/JsonConversion.java
>
>
> But yeah, if you want separate methods for each node/statement type,
> one will have to do some work!
>
> Also, I believe I have not totally round-tripped the HelloWorld
> example. I'll do some work on that now.
>
> John
>
>
>
More information about the x3d-public
mailing list