[x3d-public] X3D JSON encoding: Purpose and Comments

Leonard Daly Leonard.Daly at realism.com
Wed Dec 23 10:24:56 PST 2015


On 12/23/2015 9:42 AM, John Carlson wrote:
> Purpose:  Avoid XML and the DOM api (probably not the best reason). 
>  The loader uses the DOM api, so…


When you load a JSON file into the DOM don't you get the DOM interface 
anyway? (or am I misunderstanding the statement)

Stating you want to avoid XML is insufficient. Why do you want to avoid 
XML? Is it the parsing? Don't like angle brackets? Want an object 
representation vs. a document one?

HTML is very like XML. Is there a problem there too?


Leonard Daly




>
> Purpose:  Near native access times.  JavaScript only.  Does not apply 
> to parsing. Cecile can weigh in here.
>
> Joh
>> On Dec 23, 2015, at 10:49 AM, Leonard Daly <Leonard.Daly at realism.com 
>> <mailto:Leonard.Daly at realism.com>> wrote:
>>
>> I have been following the discussion on JSON for a while. I got 
>> behind on email reading, so I don't know if this was addressed after 
>> this email.
>>
>> I think there is one question that need to be asked first:
>>
>> *What is the purpose of the JSON encoding?*
>>
>> JSON is used for a variety of purposes, including efficient data 
>> transfer, storage, and archive. Each of these purposes has its own 
>> requirements. For example for transfer you typically want a compact 
>> format that takes little time and memory to process on the receiving 
>> end. Small sizes are important for archive formats, but they also 
>> need to have longevity. Taking additional time to unpack is generally 
>> not a problem.
>>
>> If a file is hand-created or edited; then comments are important. 
>> While auto-generated, intermediate, or data-base generated files 
>> typically do not have comments (or contain only minimal comments).
>>
>> So, back to my question. If the JSON format is primarily for 
>> transfer, then it should be compact and without non-essential data. 
>> Since comments are not part of the X3D content model; they are 
>> non-essential data to the file and should not be included in it.
>>
>> If the purpose is for archival or non-archival storage, then comments 
>> are important and need to be included (unless the JSON format is 
>> strictly an intermediate format).
>>
>> I do not think it reasonable to state that all X3D encodings are 
>> storage (or all choices). That ignores the best features of any 
>> encoding and forces all encodings to support the worst features of each.
>>
>>
>>
>> -- 
>> *Leonard Daly*
>> 3D Systems & Cloud Consultant
>> X3D Co-Chair on Sabbatical
>> LA ACM SIGGRAPH Chair
>> President, Daly Realism - /Creating the Future/
>> _______________________________________________
>> x3d-public mailing list
>> x3d-public at web3d.org <mailto:x3d-public at web3d.org>
>> http://web3d.org/mailman/listinfo/x3d-public_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/20151223/28d38a5b/attachment-0001.html>


More information about the x3d-public mailing list