[x3d-public] MFString quoting [was: interesting sample] JSONescaping example

yottzumm at gmail.com yottzumm at gmail.com
Sat May 6 11:19:37 PDT 2017

Specifically, Don used XML entities in this Java code that looks like a Java encoding.


meanwhile, on the other other other hand, .java escapes both \ and " characters as \\ and \" within a quoted String, and the comment/MFString example above looks like

.addChild(new ShapeObject()
   .addComments(" ☺ = smiley face emoticon, and \"\" means skip a line ")
   .setGeometry(new TextObject().setString(new MFStringObject("\"Have a \\\" quote character\" \"with X3D!\" \"\" \":)   ☺\""))

which compiles and (based on other examples) converts OK, apparently.  thank goodness.


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

More information about the x3d-public mailing list