<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:53:57 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>[JAVA-1175] Expose com.mongodb.util.ClassMapBasedObjectSerializer to Allow Overriding of ObjectSerializers for Specific Types</title>
                <link>https://jira.mongodb.org/browse/JAVA-1175</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I noticed that &lt;tt&gt;JSONSerializers.getStrict()&lt;/tt&gt; and &lt;tt&gt;JSONSerializers.getLegacy()&lt;/tt&gt; are implemented using the package-accessible &lt;tt&gt;com.mongodb.util.ClassMapBasedObjectSerializer&lt;/tt&gt; class.&lt;/p&gt;

&lt;p&gt;In the case of &lt;tt&gt;org.bson.types.Binary&lt;/tt&gt;, the legacy serializer doesn&apos;t produce valid JSON; it produces a bare, unquoted string &lt;a href=&quot;https://github.com/mongodb/mongo-java-driver/blob/37b3771e4837245a33bc22cefa3fd848445a7f25/src/main/com/mongodb/util/JSONSerializers.java#L121&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;&amp;lt;Binary Data&amp;gt;&lt;/tt&gt;&lt;/a&gt;.  The strict serializer produces valid JSON (quoted) string but obviously can be very, very verbose.&lt;/p&gt;

&lt;p&gt;I&apos;d like to be able to override the serializer and produce something in between the legacy and strict implementations for Binary: a valid JSON string that&apos;s a truncated string representation that the strict implementation outputs.  This would require making the &lt;tt&gt;com.mongodb.util.ClassMapBasedObjectSerializer&lt;/tt&gt; public.&lt;/p&gt;</description>
                <environment></environment>
        <key id="132461">JAVA-1175</key>
            <summary>Expose com.mongodb.util.ClassMapBasedObjectSerializer to Allow Overriding of ObjectSerializers for Specific Types</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="stephen.lee">Stephen Lee</reporter>
                        <labels>
                    </labels>
                <created>Mon, 21 Apr 2014 20:47:58 +0000</created>
                <updated>Wed, 8 Nov 2017 15:25:30 +0000</updated>
                            <resolved>Wed, 8 Nov 2017 15:25:30 +0000</resolved>
                                                                    <component>JSON</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1720397" author="jeff.yemin" created="Wed, 8 Nov 2017 15:25:30 +0000"  >&lt;p&gt;The &lt;tt&gt;org.bson.json.JsonWriter&lt;/tt&gt; class now has comprehensive support for customizing the JSON output of any BSON type.  See &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1772&quot; title=&quot;Make it easier to change JsonWriter&#160;behaviour&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1772&quot;&gt;&lt;del&gt;JAVA-1772&lt;/del&gt;&lt;/a&gt; for details.  Please use &lt;tt&gt;JsonWriter&lt;/tt&gt; for JSON serialization, as the &lt;tt&gt;com.mongodb.util.JSON&lt;/tt&gt; class is now deprecated.&lt;/p&gt;</comment>
                            <comment id="558303" author="jeff.yemin" created="Tue, 22 Apr 2014 01:38:07 +0000"  >&lt;p&gt;Can you describe your use case for this request?&lt;/p&gt;</comment>
                    </comments>
                    <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|hrgan3:</customfieldvalue>

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