[SERVER-7437] jsonString does not handle Timestamps as documented Created: 21/Oct/12  Updated: 28/Oct/15  Resolved: 18/Dec/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 2.3.2

Type: Bug Priority: Minor - P4
Reporter: Shaun Verch Assignee: Shaun Verch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-8639 toJson produces incorrect shell TimeS... Closed
is related to SERVER-7718 Timestamp constructor in shell should... Closed
Backwards Compatibility: Major Change
Operating System: ALL
Participants:

 Description   

http://www.mongodb.org/display/DOCS/Mongo+Extended+JSON

Current output:

{"t": <t>, "i": <i>}

Expected output:
Strict:
{ "$timestamp" :

{"t": <t>, "i": <i>}

}
Non strict:
Timestamp( <t>, <i> )



 Comments   
Comment by auto [ 18/Dec/12 ]

Author:

{u'date': u'2012-11-27T23:48:36Z', u'email': u'shaun.verch@10gen.com', u'name': u'Shaun Verch'}

Message: SERVER-7437 Fixed handling of timestamp object in jsonString
Branch: master
https://github.com/mongodb/mongo/commit/67ec3ed7d7550cf5d39458c5a6026568a802557a

Comment by auto [ 22/Nov/12 ]

Author:

{u'date': u'2012-11-22T04:33:16Z', u'email': u'shaun.verch@10gen.com', u'name': u'Shaun Verch'}

Message: Revert "SERVER-7437 Fixed handling of timestamp object in jsonString"

This reverts commit 7582d50b18dedef00b605f8a44cd11d267be540c.
Branch: master
https://github.com/mongodb/mongo/commit/ae9f99dbc9eb0683147078d290d3f1b8171fe864

Comment by auto [ 22/Nov/12 ]

Author:

{u'date': u'2012-10-21T17:05:36Z', u'email': u'shaun.verch@10gen.com', u'name': u'Shaun Verch'}

Message: SERVER-7437 Fixed handling of timestamp object in jsonString
Branch: master
https://github.com/mongodb/mongo/commit/7582d50b18dedef00b605f8a44cd11d267be540c

Comment by Tad Marshall [ 21/Oct/12 ]

Breaking change: this makes the behavior match the documentation so the docs are correct after this change, but old code that depended on the (undocumented) incorrect behavior would need to be updated after this change. A small note appended to the documentation for Timestamp() in the REST interface would do:, for example

Note: versions of MongoDB prior to version 2.3.1 incorrectly returned

{ t : <t> , i : <i> }

where <t> was in milliseconds instead of seconds. Version 2.3.1 and higher return values as documented here.

Comment by Shaun Verch [ 21/Oct/12 ]

http://codereview.10gen.com/8620103/

Generated at Thu Feb 08 03:14:32 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.