Uploaded image for project: 'MongoDB CLI Tools'
  1. MongoDB CLI Tools
  2. TOOLS-382

bsondump rewrite handles invalid arrays differently than legacy bsondump

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      When given an invalid bson file where an array subdocument has been transformed to read

      {"0": 1, "1":2, "9":3, "3":4}

      instead of

      {"0": 1, "1":2, "2":3, "3":4}

      when dumping this file, C++ bsondump prints

      { "_id" : ObjectId( "546513184bf6e4cb017c5309" ), "type" : "array", "ex" : [ 1, 2, undefined, undefined, undefined, undefined, undefined, undefined, undefined, 3, 4 ] }

      but the Go rewrite prints

      {"_id":{"$oid":"546513184bf6e4cb017c5309"},"ex":[1,2,3,4],"type":"array"}

        Attachments

          Activity

            People

            Assignee:
            backlog-server-platform Backlog - Platform Team
            Reporter:
            kyle.erf Kyle Erf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: