[x3d-public] [x3d] Proposal for X3D JSON encoding. Array of arrays for anyarray

Leonard Daly Leonard.Daly at realism.com
Tue Jun 21 19:12:23 PDT 2016


It appears that the conversation should be on x3d-public...


On 6/21/2016 11:26 AM, John Carlson wrote:
>
> I think just the top level and one level down would be sufficient, but 
> I don’t really know for sure. It may depend on testing the right proto 
> to get a test case.
>

John,

I know that JavaScript, PHP, Perl, and many other languages build arrays 
or arrays, arrays of hashes, hashes of arrays, etc. in multi-level 
structures. It is usually done to store a complete package of data. 
These structures frequently have cross and parent/child references to 
make them circular -- for example DOM does this. I presume that you are 
proposing a non-circular representation of the data.

You may have answered these questions along the way, but I don't 
remember seeing it. What is the purpose of this structure from an X3D 
context? Is there some object that you cannot store in the existing X3D 
structure that would be able to be stored in this structure?

My concern is that if the JSON encoding supports this structure does 
that mean the structure needs to also appear in the other encodings? If 
so, how would that be done?


Leonard Daly





> John
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for 
> Windows 10
>
> *From: *Roy Walmsley <mailto:roy.walmsley at ntlworld.com>
> *Sent: *Tuesday, June 21, 2016 10:29 AM
> *To: *'John Carlson' <mailto:yottzumm at gmail.com>; 'Don Brutzman' 
> <mailto:brutzman at nps.edu>; 'X3D Graphics member mailing list' 
> <mailto:x3d at web3d.org>
> *Subject: *RE: [x3d] Proposal for X3D JSON encoding. Array of arrays 
> for anyarray
>
> Hi,
>
> My concern in considering this candidate extension is for validation 
> tools. My gut reaction is to consider that it would be impossible to 
> validate and MFxxxx. We have appreciated that the JSON schema can 
> provide good validation for MFxxxx field validation. If arrays could 
> be nested, we would likely lose this capability.
>
> Another question would be how many levels of nesting might be permitted?
>
> Roy
>
> *From:*x3d [mailto:x3d-bounces at web3d.org] *On Behalf Of *John Carlson
> *Sent:* 21 June 2016 13:37
> *To:* Don Brutzman; X3D Graphics member mailing list
> *Subject:* Re: [x3d] Proposal for X3D JSON encoding. Array of arrays 
> for any array
>
> You could specify in the standard that any array of arrays would be 
> treated like a single array with the elements in the same order as 
> they appear textually (however you say that).
>
> On Jun 21, 2016 8:32 AM, "John Carlson" <yottzumm at gmail.com 
> <mailto:yottzumm at gmail.com>> wrote:
>
> Actually, I'm only asking where MFNode is already valid.
>
> On Jun 21, 2016 8:29 AM, "John Carlson" <yottzumm at gmail.com 
> <mailto:yottzumm at gmail.com>> wrote:
>
> Not required, but possible MFInt32:
>
> [5, [6,7],8,[9,1,0]]  MFFloat would be similar.  I'm not asking for a 
> change to Vec or Matrix types.
>
> On Jun 21, 2016 8:11 AM, "John Carlson" <yottzumm at gmail.com 
> <mailto:yottzumm at gmail.com>> wrote:
>
> -children:[
> { Transform: ... },
> [ { Transform }, { Transform }],
> { Transform } ]
>
> On Jun 21, 2016 7:37 AM, "Don Brutzman" <brutzman at nps.edu> wrote:
>
> Interesting. There may be ways to accomplish what you want already, 
> when writing in source code.
>
> Examples would help, pseudo-syntax is OK.  Please describe an example 
> or two and let's see what currently works and what doesn't.  TIA.
>
>
> On 6/20/2016 8:45 PM, John Carlson wrote:
>
> I am proposing that implemenations and perhaps the standard should 
> accept arrays of arrays where arrays are found.  So any MF* can be a 
> combination of SF* and MF*, where * is a type.  So an MFNode can be a 
> collection of SFNodes and MFNodes.  The implementation may choose to 
> flatten the array of arrays into a single array.
>
> What do you think?
>
> John
>
>
> 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 <tel:%2B1.831.656.2149>
> X3D graphics, virtual worlds, navy robotics 
> http://faculty.nps.edu/brutzman
>
>
>
> _______________________________________________
> x3d mailing list
> x3d at web3d.org
> http://web3d.org/mailman/listinfo/x3d_web3d.org


-- 
*Leonard Daly*
3D Systems & Cloud Consultant
X3D Co-Chair on Sabbatical
LA ACM SIGGRAPH Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20160621/eba2f4ed/attachment.html>


More information about the x3d-public mailing list