<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:38:41 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DOCS-447] Representation of the second example on bsonspec.org is incorrect</title>
                <link>https://jira.mongodb.org/browse/DOCS-447</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;The second example (see the bottom of the page) on &lt;a href=&quot;http://bsonspec.org/#/specification&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://bsonspec.org/#/specification&lt;/a&gt; shows an incorrect representation for the provided document (the one that starts &lt;/p&gt;
{&quot;BSON&quot;: ... }
&lt;p&gt;. Among the problems:&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;The terminating NULL for the cstring &apos;BSON&apos; is shown as \x00&amp;amp;&lt;/li&gt;
	&lt;li&gt;Another byte is printed as 0x020 a bit later on&lt;/li&gt;
	&lt;li&gt;Yet another byte is printed as \x011&lt;/li&gt;
	&lt;li&gt;Yet another byte is printed as \x14@&lt;/li&gt;
	&lt;li&gt;Yet another byte is printed as \x102&lt;/li&gt;
&lt;/ul&gt;


</description>
                <environment></environment>
        <key id="48148">DOCS-447</key>
            <summary>Representation of the second example on bsonspec.org is incorrect</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="sam.kleinman">Sam Kleinman</assignee>
                                    <reporter username="andrew.morrow@mongodb.com">Andrew Morrow</reporter>
                        <labels>
                    </labels>
                <created>Sun, 26 Aug 2012 19:19:11 +0000</created>
                <updated>Wed, 2 Nov 2016 20:00:14 +0000</updated>
                            <resolved>Mon, 12 Nov 2012 18:24:37 +0000</resolved>
                                                                    <component>drivers</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="186798" author="samk" created="Mon, 12 Nov 2012 18:24:37 +0000"  >&lt;p&gt;BSONspec.org needs a lot of work, still, but I&apos;ve corrected this error, and we can continue to iterate on this.&lt;/p&gt;</comment>
                            <comment id="183844" author="acm" created="Thu, 8 Nov 2012 00:40:54 +0000"  >&lt;p&gt;I think all that really needs to happen is to replace the ASCII&apos;d characters with the hex values for the bytes that do not originate in a string context.&lt;/p&gt;</comment>
                            <comment id="183761" author="samk" created="Wed, 7 Nov 2012 21:29:09 +0000"  >&lt;p&gt;What are the next steps on this? &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=scotthernandez&quot; class=&quot;user-hover&quot; rel=&quot;scotthernandez&quot;&gt;scotthernandez&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=acm&quot; class=&quot;user-hover&quot; rel=&quot;acm&quot;&gt;acm&lt;/a&gt;, &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=epc&quot; class=&quot;user-hover&quot; rel=&quot;epc&quot;&gt;epc&lt;/a&gt;, and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=gjmurakami&quot; class=&quot;user-hover&quot; rel=&quot;gjmurakami&quot;&gt;gjmurakami&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="158483" author="scotthernandez" created="Thu, 30 Aug 2012 13:29:09 +0000"  >&lt;p&gt;Maybe we should color code for string/hex/literal values in the&lt;br/&gt;
representation, or we could provide a hex only representation in addition&lt;br/&gt;
to the mixed one for clarity.&lt;/p&gt;
</comment>
                            <comment id="158455" author="acm" created="Thu, 30 Aug 2012 12:16:57 +0000"  >&lt;p&gt;Hi Gary -&lt;/p&gt;

&lt;p&gt;Given your final representation, I&apos;m guessing you figured out what some of my reply would have been to your earlier comments: e.g. that the bytes that encode @ and &amp;amp; as characters should not be presented as such because the context in which they appear is not that of a string. Your last example also shows the correct number of individual float bytes, which is good, and I think it is more readable.&lt;/p&gt;

&lt;p&gt;However, I think that maybe the best way is just to avoid doing any interpretation of the bytes at all. So the example would read: &lt;/p&gt;

&lt;p&gt;\x31\x00\x00\x00\x04\x42\x53\x4f\x4e\x00\x26\x00\x00\x00\x02\x30\x00\x08\x00\x00\x00\x61\x77\x65\x73\x6f\x6d\x65\x00\x01\x31\x00\x33\x33\x33\x33\x33\x33\x14\x40\x10\x32\x00\xc2\x07\x00\x00\x00\x00&lt;/p&gt;

&lt;p&gt;As long as you keep the page behavior where mousing over different pieces of the json highlight the equivalent portion of the BSON data and vice versa, then it should be clear that the byte sequence \x42\x53\x4f\x4e is &apos;BSON&apos; because it will be highlighted on the page. Anyone who is interested in the binary encoding will understand this.&lt;/p&gt;
</comment>
                            <comment id="158339" author="gjmurakami" created="Thu, 30 Aug 2012 05:00:20 +0000"  >&lt;p&gt;Certainly if Andrew or anyone has a better idea, we welcome any and all suggestions for improvement.  Would white space help?  Jira will probably throw away my indentation in the following attempt at a clearer example amplification.&lt;/p&gt;

&lt;p&gt;\x31 \x00 \x00 \x00 (int32)&lt;br/&gt;
                    \x04 (type 4 Array)&lt;br/&gt;
                    BSON \x00 (e_name)&lt;br/&gt;
                    \x26 \x00 \x00 \x00 (int32)&lt;br/&gt;
                                        \x02 (type 2 UTF-8 string)&lt;br/&gt;
                                        \x30 \x00 \x08 \x00 (int32)&lt;br/&gt;
                                        0 \x00 (e_name)&lt;br/&gt;
                                        awesome \x00 (string)&lt;br/&gt;
                                        \x01 (type 1 Floating point)&lt;br/&gt;
                                        1 \x00 (e_name)&lt;br/&gt;
                                        \x33 \x33 \x33 \x33 \x33 \x33 \x14 \x40 (double)&lt;br/&gt;
                                        \x10 (type 16 int32)&lt;br/&gt;
                                        2 \x00 (e_name)&lt;br/&gt;
                                        \xc2 \x07 \x00  \x00 (int32)&lt;br/&gt;
                    \x00  (end Array)&lt;br/&gt;
\x00 (end Document)&lt;/p&gt;</comment>
                            <comment id="158335" author="gjmurakami" created="Thu, 30 Aug 2012 04:27:54 +0000"  >&lt;p&gt;It&apos;s hard to make these examples more understandable.  I&apos;ve seen other representations that are visually clearer but less standard, and then you have to explain the non-standard representations that aren&apos;t even generated by code.&lt;/p&gt;

&lt;p&gt;Here&apos;s an alternative that&apos;s &quot;standard.&quot;&lt;br/&gt;
&amp;gt; require &apos;uri&apos;&lt;br/&gt;
 =&amp;gt; true &lt;br/&gt;
1.9.3-p194 :003 &amp;gt; URI.encode(BSON.serialize(&lt;/p&gt;
{&quot;BSON&quot;=&amp;gt;[&quot;awesome&quot;, 5.05, 1986]}
&lt;p&gt;).to_s)&lt;br/&gt;
 =&amp;gt; &quot;1%00%00%00%04BSON%00&amp;amp;%00%00%00%020%00%08%00%00%00awesome%00%011%00333333%14@%102%00%C2%07%00%00%00%00&quot;&lt;/p&gt;

&lt;p&gt;I think that most programmers are more facile at reading the \x00 hex escapes.&lt;/p&gt;</comment>
                            <comment id="158334" author="gjmurakami" created="Thu, 30 Aug 2012 04:20:57 +0000"  >&lt;p&gt;Andrew and Sam, did you try it in a driver?&lt;/p&gt;

&lt;p&gt;Here the log for ruby.&lt;br/&gt;
$ irb&lt;br/&gt;
1.9.3-p194 :001 &amp;gt; require &apos;bson&apos;&lt;br/&gt;
 =&amp;gt; true &lt;br/&gt;
1.9.3-p194 :002 &amp;gt; BSON.serialize(&lt;/p&gt;
{&quot;BSON&quot;=&amp;gt;[&quot;awesome&quot;, 5.05, 1986]}
&lt;p&gt;).to_s&lt;br/&gt;
 =&amp;gt; &quot;1\x00\x00\x00\x04BSON\x00&amp;amp;\x00\x00\x00\x020\x00\b\x00\x00\x00awesome\x00\x011\x00333333\x14@\x102\x00\xC2\a\x00\x00\x00\x00&quot;&lt;br/&gt;
Here&apos;s the string from the web page.&lt;br/&gt;
&quot;\x31\x00\x00\x00\x04BSON\x00&amp;amp;\x00\x00\x00\x020\x00\x08\x00\x00\x00awesome\x00\x011\x00333333&lt;br/&gt;
 \x14@\x102\x00\xc2\x07\x00\x00\x00\x00&quot;&lt;/p&gt;

&lt;p&gt;You can see that it matches up exactly given the following understanding.&lt;br/&gt;
ascii &quot;1&quot; == hex 31&lt;br/&gt;
escape &quot;\b&quot; == hex 08&lt;br/&gt;
hex C2 == hex c2&lt;br/&gt;
escape &quot;\a&quot; == hex 07&lt;br/&gt;
ascii &quot;&amp;amp;&quot; is literal ascii even if it looks odd to you here&lt;br/&gt;
ascii &quot;@&quot; is literal ascii even if it looks odd to you here&lt;br/&gt;
ascii &quot;BSON&quot; &quot;awesome&quot; &quot;333333&quot; are literal&lt;/p&gt;

&lt;p&gt;So the representation is correct, and this ticket is invalid.&lt;/p&gt;</comment>
                            <comment id="156817" author="acm" created="Sun, 26 Aug 2012 20:02:25 +0000"  >&lt;p&gt;Also, unless I&apos;m reading it wrong, you don&apos;t have enough bytes for the floating point value. There should be six \x33 bytes, not three, before the \x14\x40.&lt;/p&gt;</comment>
                            <comment id="156811" author="acm" created="Sun, 26 Aug 2012 19:24:14 +0000"  >&lt;p&gt;So, the &apos;@&apos; and &apos;&amp;amp;&apos; are clearly a bit strange. The &apos;triples&apos; are because of the stringy array indices. I think you should either remove the interpretation of alnum bytes (and just print the hex for every byte), or print &apos;BSON&apos;, &apos;awesome&apos; &apos;1&apos; &apos;2&apos;, and &apos;3&apos; in a different font. Otherwise it is hard to see what is going on.&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 27 Aug 2012 13:27:06 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 14 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 14 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>andrew.morrow@mongodb.com</customfieldvalue>
            <customfieldvalue>gjmurakami</customfieldvalue>
            <customfieldvalue>sam.kleinman</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrscsv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrghb3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9742</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hryjb3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>