[x3d-public] Is https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.json valid?

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Fri Jun 30 22:28:05 PDT 2023


Hi John.  All of the JSON that you find is produced by our X3dToJson.xslt
stylesheet, which hopefully meets all patterns we derived and documented at

 

*	X3D to JSON Stylesheet Converter
*	https://www.web3d.org/x3d/stylesheets/X3dToJson.html

 

Well-formed JSON can be checked.  All of our online examples have a link to
check via JSONLint, though tonight it is saying "unable to connect" (while
providing plenty of advertising).

 

*	X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 01
Technical Overview, Hello World
*
https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOverview
/HelloWorldIndex.html
*	upper-right inset box of links:
<https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter01TechnicalOvervie
w/HelloWorld.json> .json (
<https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthor
s/Chapter01TechnicalOverview/HelloWorld.json> check)
*
https://jsonlint.com/?json=https://X3dGraphics.com/examples/X3dForWebAuthors
/Chapter01TechnicalOverview/HelloWorld.json

 

If there are mistakes in our X3D .xml -> .json pattern or the conversion
stylesheet, they can be fixed.

 

Strict JSON validation isn't possible until a JSON Schema is approved.  If
you think that there is a Java-based implementation of the draft JSON Schema
that is mature and stable enough to deserve our time, we can try adding that
to our various build tools for X3D Example Archives and X3DJSAIL.

 

*	http://json-schema.org

 

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: John Carlson <yottzumm at gmail.com> 
Sent: Friday, June 30, 2023 8:24 PM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Is
https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.j
son valid?

 

Don, if

 

https://www.web3d.org/specifications/java/examples/HelloWorldProgramOutput.j
son

 

is supposed to be valid X3D JSON, please inform me.  Thanks! 

 

To ensure that -value is not a field of Shape in JSON, I have added the
following exception in x3djsonld.py.

 

 

        if parent in ("Text", "Shape") and key in ("value"):  # don't have
value yet, sorry

            # do value later

            raise "-value not a supported field of Text or Shape, try
-metadata?"

            continue

 

I can revert the code if necessary.  I'm trying to follow the standard as I
see it.

 

If -value under Shape is correct, then X3DJSAIL needs to support addValue
(as I have it in Java) or setValue.  That's my opinion.

 

John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230701/978eb224/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5464 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230701/978eb224/attachment-0001.p7s>


More information about the x3d-public mailing list