<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:17 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>[CSHARP-599] Add option to JsonWriter which allows to output the datetimes in ISO-8601 format</title>
                <link>https://jira.mongodb.org/browse/CSHARP-599</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;Currently the JsonOutputMode-enum offers few different options which allows one to configure how the DateTimes are formatted with JsonWriter. To provide a better compatibility with other frameworks, it would be great if the JsonWriter could be configured to output the dates in ISO-8601 format. This format is currently the default format used by the ASP.NET Web Api: &lt;a href=&quot;http://www.hanselman.com/blog/OnTheNightmareThatIsJSONDatesPlusJSONNETAndASPNETWebAPI.aspx&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.hanselman.com/blog/OnTheNightmareThatIsJSONDatesPlusJSONNETAndASPNETWebAPI.aspx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I forked the drivers and added this option in here: &lt;a href=&quot;https://github.com/mikoskinen/mongo-csharp-driver/commit/a04fe07dd13ac8990b516e4dcdf9d9edd8fb502a&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mikoskinen/mongo-csharp-driver/commit/a04fe07dd13ac8990b516e4dcdf9d9edd8fb502a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I added a new boolean UseISO8601DateFormat to JsonWriter which allows you to change the formatting. Is this a good place for it or should there be a new enum option in the JsonOutputMode? Also, I&apos;ve enable the new formatting only when the flag UseISO8601DateFormat is set to true AND the JsonOutputMode is Shell. I&apos;m not that familiar with the difference of these modes so I&apos;m not sure if this option should be enable for others too.&lt;/p&gt;</description>
                <environment></environment>
        <key id="52875">CSHARP-599</key>
            <summary>Add option to JsonWriter which allows to output the datetimes in ISO-8601 format</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="mikaelkoskinen">Mikael Koskinen</reporter>
                        <labels>
                            <label>driver</label>
                            <label>json</label>
                    </labels>
                <created>Thu, 11 Oct 2012 05:41:48 +0000</created>
                <updated>Mon, 20 May 2019 14:48:38 +0000</updated>
                            <resolved>Mon, 20 May 2019 14:48:28 +0000</resolved>
                                    <version>1.6</version>
                                                    <component>Feature Request</component>
                                        <votes>1</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="2252590" author="ian@10gen.com" created="Mon, 20 May 2019 14:48:28 +0000"  >&lt;p&gt;Given that we don&apos;t plan to implement this specifically but will solve this via &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1918&quot; title=&quot;Implement Extended JSON specification&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1918&quot;&gt;&lt;del&gt;CSHARP-1918&lt;/del&gt;&lt;/a&gt;, we&apos;re closing this as a duplicate and would like to redirect any watchers here to follow &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1918&quot; title=&quot;Implement Extended JSON specification&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1918&quot;&gt;&lt;del&gt;CSHARP-1918&lt;/del&gt;&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1858&quot; title=&quot;Add user configurable output converters to JsonWriter&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1858&quot;&gt;&lt;del&gt;CSHARP-1858&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1447712" author="rstam" created="Fri, 2 Dec 2016 14:57:44 +0000"  >&lt;p&gt;This issue will be resolved as part of &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-1858&quot; title=&quot;Add user configurable output converters to JsonWriter&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-1858&quot;&gt;&lt;del&gt;CSHARP-1858&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="1445332" author="dwayne@dwaynebull.co.uk" created="Tue, 29 Nov 2016 22:55:24 +0000"  >&lt;p&gt;Me checking in for the yearly update &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
I&apos;ve been watching this for almost 3 years now.&lt;br/&gt;
Any progress?&lt;/p&gt;</comment>
                            <comment id="1007129" author="rstam" created="Mon, 17 Aug 2015 14:43:05 +0000"  >&lt;p&gt;Hi Dwayne, no updates yet.&lt;/p&gt;

&lt;p&gt;This is a special case of the more general problem of wanting to exert control over the shape of the generated JSON, and in particular about what to do with BSON values (like DateTime) that don&apos;t have corresponding JSON equivalents.&lt;/p&gt;

&lt;p&gt;We&apos;ve made several experimental attempts to provide more control over the generated JSON, mostly in the context of &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-999&quot; title=&quot;Add support for writing the new $numberLong extended JSON format added in server 2.6&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-999&quot;&gt;&lt;del&gt;CSHARP-999&lt;/del&gt;&lt;/a&gt;, but all attempts have floundered when it came to designing exactly &lt;b&gt;how&lt;/b&gt; one would configure a JsonWriter to control the generated output. There is an inherent conflict between wanting to keep the API simple (fewer knobs) and allowing more configuration options (more knobs). So far we haven&apos;t come up with the right API with the right balance.&lt;/p&gt;</comment>
                            <comment id="1006505" author="dwayne@dwaynebull.co.uk" created="Sat, 15 Aug 2015 18:45:09 +0000"  >&lt;p&gt;Me again, just wondering if there are any updates here.&lt;/p&gt;</comment>
                            <comment id="511610" author="dwayne@geekbeach.com" created="Fri, 7 Mar 2014 17:11:00 +0000"  >&lt;p&gt;Has there been any progress on this issue?&lt;/p&gt;</comment>
                            <comment id="463532" author="superduperjon" created="Sat, 30 Nov 2013 19:35:25 +0000"  >&lt;p&gt;Is there a solution to outputting dates as ISO-8601 when calling the ToJson extension method on a BsonDocument, preferably without having to know any particular element name? Am I supposed to add a Convention to BsonDocument?&lt;/p&gt;</comment>
                            <comment id="176552" author="mikaelkoskinen" created="Thu, 18 Oct 2012 10:19:51 +0000"  >&lt;p&gt;Thanks Robert for the comment and for the alternative solution. &lt;/p&gt;

&lt;p&gt;It&apos;s true that this probably prevents the round-tripping from working. I&apos;ll try to sort that out.&lt;/p&gt;</comment>
                            <comment id="174089" author="rstam" created="Fri, 12 Oct 2012 05:32:22 +0000"  >&lt;p&gt;Looks like this change would prevent DateTime values from round-tripping.&lt;/p&gt;

&lt;p&gt;Did you try to read the JSON document back to see if you could successfully get back the document you started with?&lt;/p&gt;

&lt;p&gt;An existing alternative is to tell the serializer to use a string representation for a particular DateTime, and it will be output in ISO-8601 format. If you do it this way, it will round-trip.&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;public class Post&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    // other properties&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&amp;nbsp;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    [BsonRepresentation(BsonType.String)]&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;    public DateTime PublishedAt { get; set; }&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</comment>
                            <comment id="173631" author="mikaelkoskinen" created="Thu, 11 Oct 2012 06:07:13 +0000"  >&lt;p&gt;And here&apos;s a bug fix without so many bugs in few lines of code &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mikoskinen/mongo-csharp-driver/commit/309bac1fc9f8c624af83d204e477b200be7231ef&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mikoskinen/mongo-csharp-driver/commit/309bac1fc9f8c624af83d204e477b200be7231ef&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="173623" author="mikaelkoskinen" created="Thu, 11 Oct 2012 05:43:37 +0000"  >&lt;p&gt;&quot;I added a new boolean UseISO8601DateFormat to JsonWriter&quot; should have been &quot;I added a new boolean UseISO8601DateFormat to &lt;b&gt;JsonWriterSettings&lt;/b&gt;&quot;.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="353476">CSHARP-1918</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="335885">CSHARP-1858</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|hsme6n:</customfieldvalue>

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