[x3d-public] [x3d:tickets] #10 JSON schema errors that start to make sense. Need X3dToJson.xslt updates to create MFString arrays.

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Mon Jan 17 21:37:27 PST 2022


Hi John.  What is happening?

Regarding proposed handing of X3D MFString in JSON:  I've let you know in email, telephone call and issue tracker that JSON MFString is documented on the following page, which we produced together.  There are also thousands of X3D Examples online that each include JSON encoding.


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

If you scroll down that page to JSON strings, you will find an unambiguous JSON-produced railroad-track diagram and following table entry.  Seems simple.


  *   https://www.web3d.org/x3d/stylesheets/X3dToJson.html#strings

X3D scene graph
JSON representation
SFString is unquoted XML attribute value
JSON value of string type. Backslash \ (reverse solidus) characters get escaped with an adjacent backslash \ character, resulting in \\ value.
Similarly " (quotation mark) characters get escaped with an adjacent backslash as \" value.
MFString is array of quoted SFString (XML attribute) values
JSON array of string type

Are you now OK with what is stated and demonstrated regarding X3D MFString as JSON arrays of string type?

Meanwhile it is not clear from the issue whether the entry is about JSON schema, X3dToJSON.xslt, MFString, JSON string, JSON string arrays, or what.  Apologies but I'm not tracking your concern.

You cite working draft (ISO-IEC19776-5, WD) but that document is in private Web3D github, unreviewed by working group, and not public.  Our group is not ready to review that yet.


  *   https://www.web3d.org/standards

Have tried reading tracker issue #10 a few times but am still not sure what the issue is asking.  Now you are cross-threading the sourceforge issue tracker and the x3d-public mailing list...  ouch.  Color me "lost" on this one.

You might be thinking about the use of an XML attribute without extra quotation marks, such as <Text string='hey now'/> which is common.  The Java and Python APIs are forgiving of such type mismatches, most of our XML-handling tools are, ClassicVRML is forgiving, it will no doubt be explicit in each of next spec versions.

Please let's dial it back and get focused.

  *   An issue tracker is good for simple fixable issues: point out specific problem, give a repeatable example.  If possible note reference and suggested solution.
  *   Mailing lists are good for announcements and general discussion.

A favorite quote: "Brevity is the soul of wit" - Hamlet, William Shakespeare.

Your efforts are appreciated but, in the midst of hugely tremendous X3D detail, we must be precise and focused.  Hope this helps.

Have Fun with X3D!  Or Else!   8)

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: x3d-public <x3d-public-bounces at web3d.org> On Behalf Of vmarchetti at kshell.com
Sent: Sunday, January 16, 2022 4:19 PM
To: John Carlson <yottzumm at gmail.com>
Cc: X3D-Public <x3d-public at web3d.org>
Subject: Re: [x3d-public] [x3d:tickets] #10 JSON schema errors that start to make sense. Need X3dToJson.xslt updates to create MFString arrays.




On Jan 16, 2022, at 4:30 PM, John Carlson <yottzumm at gmail.com<mailto:yottzumm at gmail.com>> wrote:

[tickets:#10]<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fp%2Fx3d%2Ftickets%2F10%2F&data=04%7C01%7Cbrutzman%40nps.edu%7C056d678e0d2747cead9108d9d94f126b%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637779756351904802%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=s5CLp5otd5aZaJFMlezFeZ3aZ0sxxCQHGhN%2BmLqNvOE%3D&reserved=0> JSON schema errors that start to make sense. Need X3dToJson.xslt updates to create MFString arrays.
Discussion leading towards enlightenment whether MFStrings should be arrays or strings in JSON (or both?).
Vince, I added you here because I thought you would want to advocate for a single string MFString being a string and not an arrray.


John

Thank you for including me, but I would actually advocate for the opposite, that any value typed as MFString be encoded as an MFString of 0, 1, or N>1 elements, by whatever syntax is appropriate for that encoding.

Vince



John

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20220118/a521ff6c/attachment-0001.html>


More information about the x3d-public mailing list