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

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0-rc6
    • Affects Version/s: 2.8.0-rc4
    • Component/s: mongoexport
    • None

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

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

              Created:
              Updated:
              Resolved: