[x3d-public] X3D JSON encoding: refactoring, simplifying handling of #comment and #ROUTE

John Carlson yottzumm at gmail.com
Sun Jan 3 15:55:49 PST 2016


Found it under another subject.  Ignore previous message.

Thanks,

John
> On Dec 21, 2015, at 12:44 PM, Don Brutzman <brutzman at nps.edu> wrote:
> 
> Argh.  Trying again.
> 
> Roy spotted an error:
> 
> On 12/19/2015 1:09 PM, Don Brutzman wrote:
>> =========================================
>> *alternative JSON encoding*
>> =========================================
>> "-children":[
>>   { "#comment":"Shape begin"},
>>   { "Shape":
>>     {
>>       "#comment":[
>>         "Sphere begin",
>>         "Sphere complete, Appearance begin",
>>         "Appearance complete"
>>       ],
> 
> Corrected excerpt:
> 
> =========================================
> *alternative JSON encoding*
> =========================================
> "-children":[
>  { "#comment":"Shape begin"},
>  { "Shape":
>    {
>      "-children":[
>        { "#comment":"Sphere begin"},
>        { "#comment":"Sphere complete, Appearance begin"},
>        { "#comment":"Appearance complete"}
>      ],
> 
> This is a good snippet because it shows benefits and drawbacks:
> 
> ++ Comment is always a standalone object
> ++ Reduced loss of ordering when a parent node has -children fields
> -  Use of -children inside Shape etc. is a partial misnomer; the comment is not a children field, but it is a child
> +  This improves on prior encoding, but still does not preserve order perfectly with Shape and other non-grouping nodes.
> 
> The prior alternative JSON did have these comments within the Shape correctly included - again attached.
> 
> all the best, Don
> -- 
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu <mailto: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 <http://faculty.nps.edu/brutzman>
> <HelloWorldCommentedAlternativeEncoding.json>

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


More information about the x3d-public mailing list