Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-566

mongoexport prints invalid, duplicated output when called with --pretty and --jsonArray

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.0.0-rc6
    • 2.8.0-rc4
    • mongoexport
    • None

    Description

      Running export with pretty and jsonArray causes weird double-printing behavior:

      [kyle@erf]$ mongoexport -c bug --pretty --jsonArray
      2015-01-12T11:16:59.085-0500	connected to: localhost
      [{
      	"_id": {
      		"$oid": "54b3f35a3089e46e2cc47f1b"
      	},
      	"a": 1,
      	"b": 2
      }{"_id":{"$oid":"54b3f35a3089e46e2cc47f1b"},"a":1,"b":2},
      {
      	"_id": {
      		"$oid": "54b3f35d3089e46e2cc47f1c"
      	},
      	"a": 5,
      	"b": 2
      }{"_id":{"$oid":"54b3f35d3089e46e2cc47f1c"},"a":5,"b":2},
      {
      	"_id": {
      		"$oid": "54b3f35f3089e46e2cc47f1d"
      	},
      	"a": 5,
      	"b": 7
      }{"_id":{"$oid":"54b3f35f3089e46e2cc47f1d"},"a":5,"b":7},
      {
      	"_id": {
      		"$oid": "54b3f3623089e46e2cc47f1e"
      	},
      	"a": 9,
      	"b": 9
      }{"_id":{"$oid":"54b3f3623089e46e2cc47f1e"},"a":9,"b":9}]

      Attachments

        Activity

          People

            mikeo@mongodb.com Michael O'Brien
            kyle.erf Kyle Erf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: