[x3d-public] announce: updated encoding, X3D to JSON Stylesheet Converter

Don Brutzman brutzman at nps.edu
Tue Nov 10 08:46:11 PST 2015


The X3dToJson.xslt stylesheet is an experimental effort to help create a JSON encoding for X3D Graphics.

A new release of the experimental design page, supporting tools and examples is available:

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

Status: developmental work, with design pattern being assessed by X3D community.

We plan to discuss this draft JSON encoding during the weekly X3D Working Group teleconference tomorrow, Wednesday November 10, as usual 0800-0930 pacific.

This is pretty detailed.  We have found that certain JSON constraints do not map directly to XML.  For example, so far,
a. attributes are prefixed with @ symbol to facilitate context-free parsing.
b. JSON objects require ordered collections of similar children according to field type as unique keys,
c. JSON arrays allow unordered collections of children.
d. Comments can be included if a special key is used (#comment) but order is only partially preserved.

This has meant that partial sorting of X3D scenes (documents) occurs.  For the syntax of X3D, preserving exact XML node order appears to not be completely possible.  For the semantics of X3D, which has some order dependence (DEF IDs must be defined prior to utilizing USE IDREFs for load-time performance), functional equivalence appears to be possible.

Important next steps include John Carlson's work on a loader, and examining the syntax of javascript code that authors might write when accessing X3D JSON scene graph structures.

At present, X3D has multiple formally defined encodings:  .x3d in XML, .x3dv in ClassicVRML syntax, and .x3db Compressed Binary Encoding which integrates geometric compression with Fast Infoset (FI) XML compression.  Each is an ISO standard.
Once an encoding is stable, we will work on a draft 19776-5 X3D JSON Encoding specification and a draft/informative X3D JSON schema.

On 11/8/2015 7:11 PM, Don Brutzman wrote:
> Yes outer brackets are removed from all examples.
>
> Each time I build the full distribution, the results are uploaded.
>
> http://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.zip
> http://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.zip.MD5
> http://www.web3d.org/x3d/content/examples/build.json.out (console text)
>
> convenience links follow the archive summaries table at
> http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

Feedback always welcome.  Have fun with X3D JSON!

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