Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-488

Support serialization to Mongo extended JSON format

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.8.0
    • Component/s: None
    • Labels:
      None
    • # Replies:
      11
    • Last comment by Customer:
      false

      Description

      Provide full support for serialization to http://www.mongodb.org/display/DOCS/Mongo+Extended+JSON. This can be useful for REST interfaces or other tools that use the java driver.

      So as not to break existing applications that rely on the current behavior, the output of the com.mongodb.util.JSON.serialize method will not be changed. Instead, use the following:

      com.mongodb.util.JSONSerializers.getStrict().serialize(...)

        Activity

        Hide
        antoine Antoine Girbal (Inactive) added a comment -

        note that the java serialization may not respect part of the spec..
        For example dates are output as string representing the date, not milliseconds (which is much better for human eye)

        Show
        antoine Antoine Girbal (Inactive) added a comment - note that the java serialization may not respect part of the spec.. For example dates are output as string representing the date, not milliseconds (which is much better for human eye)
        Hide
        jeff.yemin Jeff Yemin added a comment -

        There will be a legacy serializer which works as the current driver does, so as not to break existing applications that rely on the current behavior. As Bryan says, the strict serializer will work as per the spec.

        Show
        jeff.yemin Jeff Yemin added a comment - There will be a legacy serializer which works as the current driver does, so as not to break existing applications that rely on the current behavior. As Bryan says, the strict serializer will work as per the spec.
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

        Message: JAVA-488: API changes for JSON serialization. Clients should use static methods in the new JSONSerializers class
        Branch: master
        https://github.com/mongodb/mongo-java-driver/commit/7d56b141c52b7aaed988abd26dc13b0f84c3925f

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'} Message: JAVA-488 : API changes for JSON serialization. Clients should use static methods in the new JSONSerializers class Branch: master https://github.com/mongodb/mongo-java-driver/commit/7d56b141c52b7aaed988abd26dc13b0f84c3925f
        Hide
        auto auto (Inactive) added a comment -

        Author:

        {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}

        Message: JAVA-488: Rolling back unintentional API change
        Branch: master
        https://github.com/mongodb/mongo-java-driver/commit/0da01d17c97b05e2ceae2556e86ca4cdce2cd5d7

        Show
        auto auto (Inactive) added a comment - Author: {u'login': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'} Message: JAVA-488 : Rolling back unintentional API change Branch: master https://github.com/mongodb/mongo-java-driver/commit/0da01d17c97b05e2ceae2556e86ca4cdce2cd5d7
        Hide
        jeff.yemin Jeff Yemin added a comment -

        Closing for 2.8.0 release.

        Show
        jeff.yemin Jeff Yemin added a comment - Closing for 2.8.0 release.

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Days since reply:
              3 years, 11 weeks, 2 days ago
              Date of 1st Reply: