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

Binary values serialize as <BinaryData> rather than extended JSON

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.7.3
    • 2.8.0
    • API
    • None

    Description

      We have a binary value in a document that serializes to the screen in the mongo shell as:

      { "myField": BinData(2,"BINDATAHERE") }

      but in the Java driver it's serializing as

      { "myField": <Binary Data> }

      According to the Mongo extended JSON doc it should be serializing as:

      { "myField": { "$binary": "BINDATAHERE", "$type": "2" } }

      Attachments

        Activity

          People

            bryan.reinero Bryan Reinero
            jared Jared D. Cottrell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: