[x3d-public] MFString quoting [was: interesting sample] JSON escaping example
Don Brutzman
brutzman at nps.edu
Wed Apr 26 19:30:23 PDT 2017
On 4/26/2017 4:02 PM, yottzumm at gmail.com wrote:
> I do have a problem with the JSON encoding for the attached file (translated by X3dToJson.xslt). Let me know if you think otherwise. Look at all the \\\\\.
i suspect the issue is illustrated by the following SFString within an MFString
X3D "quote mark \" is ""
JSON "empty string \\\\\"\\\\\" skips a line:",
will try to break it down.
double-backslash escaping going on here for JSON; so internal content-only correspondences should likely be
[X3D ] \
[JSON] \\
[X3D ] "
[JSON] \"
[X3D ] \"
[JSON] \\\"
[X3D ] quote mark \" is "
[JSON] quote mark \\\" is "
please count. does that look right?
if so, then it looks like the X3dToJson.xslt is overzealously prepending 2 extra backslashes in this particular case (one of several).
if not, then please advise what the right answer is.
also please re-advise, where are the JSON backslash-related rules?
if we can agree on what the right answer looks like, then i will dive back into the independently XML/XSLT/XPath escaped (and obtw recursive) stylesheet template that consumes/produces this stuff to try doing the job correctly. (gulp!)
p.s. if anyone out there isn't dizzy yet, congrats!
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>
> *From: *Andreas Plesch <mailto:andreasplesch at gmail.com>
> *Sent: *Wednesday, April 26, 2017 5:21 PM
> *To: *John Carlson <mailto:yottzumm at gmail.com>
> *Cc: *Don Brutzman <mailto:brutzman at nps.edu>; X3D Graphics public mailing list <mailto:x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] MFString quoting [was: interesting sample]
>
> On Wed, Apr 26, 2017 at 3:55 PM, <yottzumm at gmail.com <mailto:yottzumm at gmail.com>> wrote:
>
> It’s
>
> http://x3dgraphics.com/slidesets/X3dForWebAuthors/Chapter02GeometryPrimitives.pdf
>
> Got caught in the grand renaming. Also the parent page is wrong.
>
> Thanks.
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