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

Binary values serialize as <BinaryData> rather than extended JSON

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0
    • Affects Version/s: 2.7.3
    • Component/s: API
    • None

      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" } }
      

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

              Created:
              Updated:
              Resolved: