<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:35:21 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>[GODRIVER-963] canonical parameter is not respected in UnmarshalExtJSON</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-963</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;The UnmarshalExtJSON function takes a canonical parameter, but does not respect it when parsing. I&apos;ve attached a repro for this.&lt;/p&gt;</description>
                <environment></environment>
        <key id="737653">GODRIVER-963</key>
            <summary>canonical parameter is not respected in UnmarshalExtJSON</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="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="divjot.arora@mongodb.com">Divjot Arora</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Fri, 12 Apr 2019 19:00:59 +0000</created>
                <updated>Mon, 1 Aug 2022 20:32:46 +0000</updated>
                                                                            <component>Documentation</component>
                                        <votes>0</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="2265962" author="esha.bhargava" created="Thu, 30 May 2019 20:24:37 +0000"  >&lt;p&gt;As discussed in triage, the work for this is to deprecate the canonical parameter.&lt;/p&gt;</comment>
                            <comment id="2215356" author="david.golden" created="Tue, 16 Apr 2019 17:42:37 +0000"  >&lt;p&gt;The intent was for parsers to accept &#8211; in a single pass &#8211; either format.&#160; But we recognized that people might wish to be more restrictive.&#160; As the &lt;tt&gt;canonical&lt;/tt&gt; option is not currently documented as having any particular behavior, I think it would be reasonable to rename it to &lt;tt&gt;canonicalOnly&lt;/tt&gt; (to be more self-documenting) and have false be the default spec behavior and true restrict to just the canonical format.&lt;/p&gt;

&lt;p&gt;That preserves the API signature, but merely tightens the semantics to what the parameter implies in the first place.&lt;/p&gt;</comment>
                            <comment id="2215327" author="jeff.yemin" created="Tue, 16 Apr 2019 17:23:14 +0000"  >&lt;p&gt;I found only &lt;a href=&quot;https://github.com/mongodb/mongo-go-driver/blob/b07d0220ac446e807f73bccce17d32db10efb8a1/bson/bsonrw/extjson_parser.go#L323-L357&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;this one place&lt;/a&gt; where canonical is referenced.  I&apos;m not really sure what the intent was of including this setting.&lt;/p&gt;</comment>
                            <comment id="2215288" author="divjot.arora" created="Tue, 16 Apr 2019 17:01:19 +0000"  >&lt;p&gt;The extended JSON spec says &quot;By default, a parser MUST accept values in either Canonical Extended JSON format or Relaxed Extended JSON format as described in this specification. A parser MAY allow users to restrict parsing to only Canonical Extended JSON format or only Relaxed Extended JSON format.&quot; The usage of &quot;restrict&quot; in this sentence suggests that the current behavior does not follow the spec. Also, from an API usage standpoint, it doesn&apos;t seem intuitive to have a canonical parameter but then not use/respect it while parsing.&lt;/p&gt;

&lt;p&gt;Two possible solutions are to change the behavior to use the parameter or to deprecate it completely and change the signature to UnmarshalExtJSON(data []byte, val interface{}).&lt;/p&gt;

&lt;p&gt;CC &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jeff.yemin&quot; class=&quot;user-hover&quot; rel=&quot;jeff.yemin&quot;&gt;jeff.yemin&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=david.golden&quot; class=&quot;user-hover&quot; rel=&quot;david.golden&quot;&gt;david.golden&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2214243" author="ian@10gen.com" created="Mon, 15 Apr 2019 20:37:36 +0000"  >&lt;p&gt;jeff to check what the spec specifies (if anything).&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="213936" name="repro.go" size="302" author="divjot.arora@mongodb.com" created="Fri, 12 Apr 2019 19:00:58 +0000"/>
                    </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|hr6k64:3</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>