Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-489

toString() formats arrays as objects

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Trivial - P5 Trivial - P5
    • 1.5.0
    • None
    • Usability
    • None

    Description

      Might be nice to print arrays with square bracket notation. I thought we used to do this, don't know why we changed the behavior (otherwise I'd just fix it myself).

      BSONObj o = fromjson( "

      {r:[1,2,3]}

      " );
      log() << "o: " << o << endl;

      Tue Dec 15 17:54:05 o: { r:

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

      }

      Attachments

        Activity

          People

            aaron Aaron Staple
            aaron Aaron Staple
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: