[x3d-public] How to tell if a file is JSON

Don Brutzman brutzman at nps.edu
Wed Dec 2 21:04:08 PST 2015


On 12/1/2015 9:00 PM, Leonard Daly wrote:
> On 12/1/2015 8:21 PM, John Carlson wrote:
>> Leonard, you can go into X3D-Edit, select an X3D file and hit the moebius circle.
>
> I am running "X3D-Edit 3.3 Authoring Tool 201302132200". It says to be the latest revision.  I have no idea where the moebius circle is or what exactly it looks like. I cannot find any conversions to JSON in the menus. I had attached the XML file (commentTest.x3d) to the previous message hoping that someone would be able to convert it. Perhaps there is not a tool for conversion at this time?

That version is from 13 February 2013.  There have been 2 or 3 occasions over the years where significant changes trip up the auto-updater.  Typical update rate is every 2-3 weeks.

The latest X3D-Edit includes .x3d to JSON conversion using the stylesheet.

	https://savage.nps.edu/X3D-Edit
	https://savage.nps.edu/X3D-Edit/images/X3D-EditToolbarButtons2.png
	https://savage.nps.edu/X3D-Edit/images/X3dToJsonConversionPanel.png

Several annotated examples have been excerpted on the X3D to JSON Stylesheet page. More will be added.

	http://www.web3d.org/x3d/stylesheets/X3dToJson.html#Examples

All of the 3000+ examples (except for some deliberately erroneous test files) have been converted.

	http://www.web3d.org/x3d/content/examples/X3dResources.html#Examples

These have all been collected as a single zip to facilitate testing, with an error log to assist debugging.

	http://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.zip
	http://www.web3d.org/x3d/content/examples/X3dExampleArchivesJsonScenes.MD5
	http://www.web3d.org/x3d/content/examples/build.json.out

John's recent release shows many of these examples getting loaded and displayed side by side in X3DOM and Cobweb.  Screenshots attached.

	http://coderextreme.net/X3DJSONLD/
	Loader source code is at:
	https://github.com/coderextreme/X3DJSONLD

Your example scene commentTest.x3d and commentTest.json are attached.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CoderExtremeX3dJsonLoaderX3domCobwebFlipper.png
Type: image/png
Size: 110742 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151202/393e22de/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CoderExtremeX3dJsonLoaderX3domCobwebFlipper-FileChooserMenu.png
Type: image/png
Size: 95206 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151202/393e22de/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commentTest.x3d
Type: model/x3d+xml
Size: 1313 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151202/393e22de/attachment-0001.x3d>
-------------- next part --------------
{ "X3D": {
    "@profile":"Immersive",
    "@version":3.2,
    "@xsd:noNamespaceSchemaLocation":"http://www.web3d.org/specifications/x3d-3.2.xsd",
    "head": {
        "#comment":[
          "Additional authoring resources for meta-tags: http://www.dublincore.org/documents/dcmi-terms http://www.dublincore.org/documents/dces http://www.w3.org/TR/html4/struct/global.html#h-7.4.4 http://vancouver-webpages.com/META http://vancouver-webpages.com/META/about-mk-metas2.html Additional authoring resources for language codes: ftp://ftp.isi.edu/in-notes/bcp/bcp47.txt http://www.loc.gov/standards/iso639-2/langhome.html http://www.iana.org/numbers.html#L"
        ],
        "meta": [
          {
            "@name":"title",
            "@content":"commentTest.x3d"
          },
          {
            "@name":"description",
            "@content":"Test of commenting in various encodings"
          },
          {
            "@name":"creator",
            "@content":"Leonard Daly"
          },
          {
            "@name":"generator",
            "@content":"X3D-Edit, https://savage.nps.edu/X3D-Edit"
          }
        ]
    },
    "Scene": {
        "#comment":[
          "Scene graph nodes are added here",
          "This is a comment and not data"
        ],
        "-children":[
          { "WorldInfo":
            {
              "@title":"Comment Test",
              "@info":["This is data and not a comment"]
            }
          }
        ]
    }
  }
}


More information about the x3d-public mailing list