[x3d-public] JSON Encoding

John Carlson yottzumm at gmail.com
Tue Dec 22 07:49:14 PST 2015


I think the significance of the “$” is a tag, type, class, etc.  In my encoding, this was “jsontag”  It essentially encodes the type of the JSON object in the JSON object.  Cecile, please correct me if I am wrong.

John
> On Dec 22, 2015, at 9:12 AM, Roy Walmsley <roy.walmsley at ntlworld.com> wrote:
> 
> Hi again, Don and Cecile.
>  
> Having looked at Cecile’s examples on GitHub I hope I am  beginning to understand the issues better. Although one thing I don’t understand is the significance of the “$” in the JSON5 encoding. For example, “appearance”:{“$”:”Appearance”,”material”:{“$”:”Material”, etc. Where is this usage defined/explained, please?
>  
> So, we take a JSON encoding (of one sort or another) and parse it. This produces some sort of internal representation, which you can reference with the appropriate string/path.
>  
> But, we also need to generate internal structures that actually manage the 3D graphics work. Then any access references relative to the internal representation have to be converted to be relative to the internal structures.
>  
> Cecile’s paths make me assume that everything is loaded “as is”, i.e. comments, structures such as children (or content), into the external representation on parsing. Even though they are going to be removed for generation of the 3D structures needed.
>  
> So, it seems to me some of the things we have to decide are:
>  
> 1)      What format of JSON do we want to use?
> 2)      Do we want to achieve lossless round tripping between encodings?
> 3)      What are the priorities for minimization, e.g. file size/complexity, access paths, etc.
> 4)      Do we want a parser/loader to convert everything as is, or to perform some optimizations along the way to eliminate comments and structures such as content/children, so that the internal representation is much closer to the 3D structures required? Or put it another way, use a standard JSON parser or a specific X3D JSON parser?
>  
> Regards,
>  
> Roy
>  
> From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Cecile Muller
> Sent: 22 December 2015 01:00
> To: X3D Graphics public mailing list
> Subject: Re: [x3d-public] JSON Encoding
>  
> Hi again Don,
>  
>  
> > Wondering, does JSON5 provide an alternative syntax for referencing the same JSON structure?
>  
> No it doesn't have one afaik.
>  
>  
> See you,
> Cecile
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

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


More information about the x3d-public mailing list