<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:14:31 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>[CDRIVER-2208] Introduce new API for Extended JSON spec 2.0 output</title>
                <link>https://jira.mongodb.org/browse/CDRIVER-2208</link>
                <project id="10030" key="CDRIVER">C Driver</project>
                    <description>&lt;p&gt;For &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2128&quot; title=&quot;Support revised Extended JSON spec&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2128&quot;&gt;&lt;del&gt;CDRIVER-2128&lt;/del&gt;&lt;/a&gt;, &lt;tt&gt;bson_as_json()&lt;/tt&gt; was changed to output relaxed JSON from the Extended JSON spec.&lt;/p&gt;

&lt;p&gt;This ticket aims to accomplish a few things:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Ensure &lt;tt&gt;bson_as_json()&lt;/tt&gt; does not significantly change its output in 1.7.0.&lt;/li&gt;
	&lt;li&gt;Rename &lt;tt&gt;bson_as_extended_json()&lt;/tt&gt; to &lt;tt&gt;bson_as_canonical_json()&lt;/tt&gt;, which will output canonical JSON from the Extended JSON spec.&lt;/li&gt;
	&lt;li&gt;Create &lt;tt&gt;bson_as_relaxed_json()&lt;/tt&gt; to output relaxed JSON from the Extended JSON spec.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Keeping &lt;tt&gt;bson_as_json()&lt;/tt&gt;&apos;s output largely unchanged will ensure that we do not introduce a subtle BC break for users depending on the structure of its current output (based on &lt;a href=&quot;https://docs.mongodb.com/v3.4/reference/mongodb-extended-json/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB 3.4&apos;s extended JSON syntax&lt;/a&gt;). Down the line, we can look at deprecating &lt;tt&gt;bson_as_json()&lt;/tt&gt; once MongoDB 3.6 is released and its tools/shell are updated to handle the new format (&lt;a href=&quot;https://jira.mongodb.org/browse/TOOLS-1610&quot; title=&quot;implement the extended json spec in import/export&quot; class=&quot;issue-link&quot; data-issue-key=&quot;TOOLS-1610&quot;&gt;&lt;del&gt;TOOLS-1610&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</description>
                <environment></environment>
        <key id="402667">CDRIVER-2208</key>
            <summary>Introduce new API for Extended JSON spec 2.0 output</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="13201">Fixed</resolution>
                                        <assignee username="jmikola@mongodb.com">Jeremy Mikola</assignee>
                                    <reporter username="jmikola@mongodb.com">Jeremy Mikola</reporter>
                        <labels>
                    </labels>
                <created>Tue, 11 Jul 2017 16:57:48 +0000</created>
                <updated>Sat, 28 Oct 2023 11:30:36 +0000</updated>
                            <resolved>Mon, 24 Jul 2017 18:02:58 +0000</resolved>
                                                    <fixVersion>1.7.0</fixVersion>
                                    <component>json</component>
                    <component>libbson</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1670930" author="ramon.fernandez" created="Tue, 12 Sep 2017 18:33:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: u&apos;ajdavis&apos;, &apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, &apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message:&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2208&quot; title=&quot;Introduce new API for Extended JSON spec 2.0 output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2208&quot;&gt;&lt;del&gt;CDRIVER-2208&lt;/del&gt;&lt;/a&gt; use bson_as_canonical_json&lt;br/&gt;
Branch:r1.7&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/685cd8ccb77408fce0585410ec6920e2b8f629ae&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/685cd8ccb77408fce0585410ec6920e2b8f629ae&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1670849" author="ramon.fernandez" created="Tue, 12 Sep 2017 18:31:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: u&apos;ajdavis&apos;, &apos;name&apos;: u&apos;Jeremy Mikola&apos;, &apos;email&apos;: u&apos;jmikola@gmail.com&apos;}
&lt;p&gt;Message:&lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2208&quot; title=&quot;Introduce new API for Extended JSON spec 2.0 output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2208&quot;&gt;&lt;del&gt;CDRIVER-2208&lt;/del&gt;&lt;/a&gt;: bson_as_canonical_json() and bson_as_relaxed_json()&lt;/p&gt;

&lt;p&gt;Introduce new functions for the canonical and relaxed formats from Extended&lt;br/&gt;
JSON Spec 2.0. This reverts previous changes to bson_as_json(), which might&lt;br/&gt;
have caused BC breaks. Maintain legacy bson_as_json() output for non-finite&lt;br/&gt;
values. Note that legacy mode will produce &quot;nan&quot; and &quot;inf&quot; literals, which&lt;br/&gt;
are not valid JSON.&lt;/p&gt;

&lt;p&gt;Also adds helper function for appending sorted regex options and regression&lt;br/&gt;
tests for bson_as_json() and multiple types.&lt;br/&gt;
Branch:r1.7&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1634756" author="xgen-internal-githook" created="Fri, 28 Jul 2017 17:40:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jmikola@gmail.com&apos;, &apos;username&apos;: &apos;jmikola&apos;, &apos;name&apos;: &apos;Jeremy Mikola&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/PHPC-941&quot; title=&quot;Introduce API for converting BSON to canonical and relaxed extended JSON&quot; class=&quot;issue-link&quot; data-issue-key=&quot;PHPC-941&quot;&gt;&lt;del&gt;PHPC-941&lt;/del&gt;&lt;/a&gt;: Add MongoDB\BSON\toCanonicalJSON() and toRelaxedJSON()&lt;/p&gt;

&lt;p&gt;In &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2208&quot; title=&quot;Introduce new API for Extended JSON spec 2.0 output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2208&quot;&gt;&lt;del&gt;CDRIVER-2208&lt;/del&gt;&lt;/a&gt;, bson_as_json() (used by toJSON()) was reverted to its original output format. Canonical and relaxed extended JSON are now produced by bson_as_canonical_json() and bson_as_relaxed_json(), respectively. This commit removes toExtendedJSON() (added in 980f1fb01a3e693e6081d09ed8e3ed9c2d76162b) in favor of the new functions.&lt;/p&gt;

&lt;p&gt;Implementations for the BSON functions have been moved to their own file, which is consistent with what we&apos;re doing for the APM subscriber functions.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-php-driver/commit/65f50910101bccaf235d0d1f5f48446bde183a4b&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-php-driver/commit/65f50910101bccaf235d0d1f5f48446bde183a4b&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1633935" author="jmikola@gmail.com" created="Thu, 27 Jul 2017 21:02:41 +0000"  >&lt;p&gt;Cherry-picked to r1.7: &lt;a href=&quot;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1630748" author="xgen-internal-githook" created="Tue, 25 Jul 2017 01:07:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;username&apos;: u&apos;ajdavis&apos;, u&apos;name&apos;: u&apos;A. Jesse Jiryu Davis&apos;, u&apos;email&apos;: u&apos;jesse@mongodb.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2208&quot; title=&quot;Introduce new API for Extended JSON spec 2.0 output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2208&quot;&gt;&lt;del&gt;CDRIVER-2208&lt;/del&gt;&lt;/a&gt; use bson_as_canonical_json&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo-c-driver/commit/7c2fe66953207e91d8abe0449a5f37fa9f62aeb9&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-c-driver/commit/7c2fe66953207e91d8abe0449a5f37fa9f62aeb9&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1630240" author="jesse" created="Mon, 24 Jul 2017 17:35:40 +0000"  >&lt;p&gt;Jira automatically links to commits on master. Here&apos;s the commit on r1.7: &lt;a href=&quot;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/6929d34e7af2ccdc1ce283daf72b4d4dff952849&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1630235" author="xgen-internal-githook" created="Mon, 24 Jul 2017 17:32:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;jmikola@gmail.com&apos;, &apos;username&apos;: &apos;jmikola&apos;, &apos;name&apos;: &apos;Jeremy Mikola&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2208&quot; title=&quot;Introduce new API for Extended JSON spec 2.0 output&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2208&quot;&gt;&lt;del&gt;CDRIVER-2208&lt;/del&gt;&lt;/a&gt;: bson_as_canonical_json() and bson_as_relaxed_json()&lt;/p&gt;

&lt;p&gt;Introduce new functions for the canonical and relaxed formats from Extended&lt;br/&gt;
JSON Spec 2.0. This reverts previous changes to bson_as_json(), which might&lt;br/&gt;
have caused BC breaks. Maintain legacy bson_as_json() output for non-finite&lt;br/&gt;
values. Note that legacy mode will produce &quot;nan&quot; and &quot;inf&quot; literals, which&lt;br/&gt;
are not valid JSON.&lt;/p&gt;

&lt;p&gt;Also adds helper function for appending sorted regex options and regression&lt;br/&gt;
tests for bson_as_json() and multiple types.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/libbson/commit/fecb9665eb8df04c3058a26601e37c6a4c0581d2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/libbson/commit/fecb9665eb8df04c3058a26601e37c6a4c0581d2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1627814" author="jmikola@gmail.com" created="Thu, 20 Jul 2017 18:45:16 +0000"  >&lt;p&gt;&lt;a href=&quot;http://mongodbcr.appspot.com/143860001&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://mongodbcr.appspot.com/143860001&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1619213" author="jesse" created="Tue, 11 Jul 2017 19:46:35 +0000"  >&lt;p&gt;I suggest you:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;Diff from d1f95c23 to HEAD, many of the changes in bson.c and test-bson.c are related to &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-1947&quot; title=&quot;Improve libbson compatibility with the BSON Corpus tests&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-1947&quot;&gt;&lt;del&gt;CDRIVER-1947&lt;/del&gt;&lt;/a&gt; / &lt;a href=&quot;https://jira.mongodb.org/browse/CDRIVER-2128&quot; title=&quot;Support revised Extended JSON spec&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CDRIVER-2128&quot;&gt;&lt;del&gt;CDRIVER-2128&lt;/del&gt;&lt;/a&gt;. The changes to bson-json.c are about parsing and I think it&apos;s reasonably backwards-compatible, unlike the generator changes.&lt;/li&gt;
	&lt;li&gt;Right now we track awkwardly which JSON mode we&apos;re in. See, for example, _bson_as_json_visit_array and _bson_as_extended_json_visit_array. Maybe add a &quot;json_mode_t&quot; enum value to the bson_json_state_t struct to track whether we&apos;re in legacy / relaxed / extended mode. That should make the next steps easier.&lt;/li&gt;
	&lt;li&gt;Restore the old test_bson_json_timestamp and use the new versions of that test for bson_as_relaxed_json instead.&lt;/li&gt;
	&lt;li&gt;Restore some of the old &quot;visit&quot; functions like _bson_as_json_visit_binary / date_time / regex / dbpointer / code / codewscope and use the new versions of those functions for bson_as_relaxed_json&apos;s visitor table. I see that _bson_as_json_visit_double also changed but I don&apos;t think it significantly broke compatibility?&lt;/li&gt;
	&lt;li&gt;When I look through the test suite now it seems like, before the BSON Corpus tests, bson_as_json was very little tested. Perhaps adapt the contents of multi-type.json for one big test of the legacy bson_as_json.&lt;/li&gt;
&lt;/ul&gt;
</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                                        </outwardlinks>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="360005">PHPC-926</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="368695">PHPC-941</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="386636">CDRIVER-2168</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="330275">PHPC-828</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="374688">CDRIVER-2128</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|ht2kmn:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>