<p dir="ltr">Note that any leading and trailing comments are not removed using my loader, so they will accumulate. I will need to go into parent DOM object, check for comments, and remove them. I don't think I want to remove all children, but that's a possibility too. What do the users want?</p>
<div class="gmail_quote">On Dec 1, 2015 2:50 AM, "John Carlson" <<a href="mailto:yottzumm@gmail.com">yottzumm@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Leonard, we were trying to capture comments into json with a special key "#comment" however I have noticed issues with leading and trailing comments. If I recall right, they cause the JSON parse to fail, or perhaps just my loader. I haven't investigated it enough to be sure yet. I imagine that any JSON schema will have to incorporate comments...should be interesting. There may be some way to represent that in schema at a global level, not sure.</p>
<p dir="ltr">John</p>
<div class="gmail_quote">On Dec 1, 2015 1:25 AM, "Leonard Daly" <<a href="mailto:web3d@realism.com" target="_blank">web3d@realism.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Comments are not allowed in a JSON file
(I used
<a href="http://stackoverflow.com/questions/244777/can-i-use-comments-inside-a-json-file" target="_blank">http://stackoverflow.com/questions/244777/can-i-use-comments-inside-a-json-file</a>
and the references contained in the page, especially to <a href="http://json.org" target="_blank">json.org</a>,
RFC 4627 and RFC 7159). <br>
<br>
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?<br>
<br>
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?<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
<br>
On 11/30/2015 9:27 PM, Don Brutzman wrote:<br>
</div>
<blockquote type="cite">On
11/30/2015 4:23 PM, John Carlson wrote:
<br>
<blockquote type="cite">There might be a comment before the first
x3d object.
<br>
</blockquote>
<br>
very interesting observation!
<br>
<br>
- since JSON does not support comments, and
<br>
- since we have come up with an allowable approach for comments
inside an X3D scene graph that allows round-trip support with
other encodings,
<br>
<br>
then
<br>
<br>
- we probably ought to deliberately avoid capturing or including
any comments in the JSON encoding that might appear outside the
"X3D" object declaration.
<br>
<br>
all the best, Don
<br>
</blockquote>
<br>
<br>
<div>-- <br>
<font color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
X3D Co-Chair<br>
Cloud Consultant<br>
President, Daly Realism - <i>Creating the Future</i>
</font></div>
</div>
<br>_______________________________________________<br>
x3d-public mailing list<br>
<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
<a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
<br></blockquote></div>
</blockquote></div>