[X3D-Public] [x3dom-developers] initial X3D JSON conversion support using X3dToJson.xslt

Don Brutzman brutzman at nps.edu
Fri Oct 10 08:47:41 PDT 2014


please clarify

On 10/10/2014 12:43 AM, Jung, Yvonne wrote:
> [...]
>>> And as already said before: this way, you can directly call JSON.parse() to gen objects.
>>
>> sounds great.  we will need to test this.  got example?
>
> JSON is a built-in JavaScript object. This works out of the box: the parse method simply creates a valid JS object from a JSON string. The resulting object tree however still has to be traversed to attach meaning and behavior.

understood, that is a key part.  reading via JSON.parse() is the entry step... then we need the result to be both the right structure and also renderable/usable.

>> am also really interested in whether the X3DOM team has already used any JSON for scene graphs internally.
>>
>> that kind of code importer would be just the thing for testing the improved numeric version of this X3dToJson exporter at the VR Hackathon next week....

comparing a variety content and code examples using different-syntax JSON will be helpful.

in any case we will keep working on generating and comparing examples.

>>>> -----Ursprüngliche Nachricht-----
>>>> Von: X3D-Public [mailto:x3d-public-bounces at web3d.org] Im Auftrag von doug
>>>> sanden
>>>> Gesendet: Donnerstag, 9. Oktober 2014 15:49
>>>> An: x3d-pulbic mlist
>>>> Betreff: Re: [X3D-Public] [x3dom-developers] initial X3D JSON conversion
>>>> support using X3dToJson.xslt
>>>>
>>>> I concur with Johannes on the A) no-defaults and D) explicit child placement (vs
>>>> containerFeild), on the design principle "Noise reduction helps adoption".
>>>> -Doug
>>
>> yes, order is significant and child placement also helps.  containerField only needed if ambiguity or overridden defaults exist (think Collision children vs. proxy).
>
> But neither in classic syntax nor in JSON, if the notation follows the latter. Therefore, your proposal below overcomplicates things and doesn't look like real JSON.

yes uncomplicating is important.  hopefully the next version of X3dToJson.xslt will incorporate the bulk of these excellent recommendations (especially how to encode numbers rather than strings) so we can keep improving.

the steady feedback is totally helpful and will ensure that we all succeed.  thanks Yvonne!

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