[x3d-public] announce: updated encoding, X3D to JSON Stylesheet Converter: string arrays, whitespace, UTF-8, Script #source

Don Brutzman brutzman at nps.edu
Mon Nov 23 11:24:47 PST 2015


On 11/21/2015 2:16 AM, John Carlson wrote:
> Any JavaScript programmer who is putting JavaScript into JSON is out of their minds anyway, so they should be responsible for any horrid encoding they have to do.

sounds fair  8)

>  If programs are doing it, it’s a different story and we should have a single workable encoding for it.

yes.  hence X3D JSON Encoding 19776-5 and round-trippable requirement, i.e. "why we are here" working on this.

> What is easiest for a program to parse to remove nasties and is still valid JSON?

suggest truly easiest approach is "don't do that," i.e. not loading #sourceText and just ignoring that field.

that might be a good security option anyway for an X3D JSON loader.

>  I do think we want to maintain valid JSON so multiline strings will not work TMK.

based on list dialog, three options currently provided by the stylesheet. all are equivalentally captured as a string array.

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

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