[x3d-public] How to tell if a file is JSON

Leonard Daly web3d at realism.com
Mon Nov 30 23:25:28 PST 2015


Comments are not allowed in a JSON file (I used 
http://stackoverflow.com/questions/244777/can-i-use-comments-inside-a-json-file 
and the references contained in the page, especially to json.org, RFC 
4627 and RFC 7159).

Does this approach puts comments into JSON data elements? If so, that 
means comments have been elevated from text in the file to data in the 
file. If this approach is to capture comments throughout the original 
non-JSON file, does that mean the data model between a JSON-encoded 
scene and an XML-encoded scene is significantly different?

Out of curiosity, does the compressed binary encoding capture comments 
from anyplace in the original scene file? If so, does the data model 
that is stored in the CBE file match that of the original file?


Leonard Daly




On 11/30/2015 9:27 PM, Don Brutzman wrote:
> On 11/30/2015 4:23 PM, John Carlson wrote:
>> There might be a comment before the first x3d object.
>
> very interesting observation!
>
> - since JSON does not support comments, and
> - since we have come up with an allowable approach for comments inside 
> an X3D scene graph that allows round-trip support with other encodings,
>
> then
>
> - we probably ought to deliberately avoid capturing or including any 
> comments in the JSON encoding that might appear outside the "X3D" 
> object declaration.
>
> all the best, Don


-- 
*Leonard Daly*
X3D Co-Chair
Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20151130/213ae464/attachment.html>


More information about the x3d-public mailing list