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

JSON values of quotes not parsed correctly by JSON to BSON parser

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None
    • ALL
    • Hide

      add the following test to jsontests.cpp

      class QuoteTest6 : public Base {
      virtual BSONObj bson() const

      { BSONObjBuilder b; b.append("test", '"'); return b.obj(); }

      virtual string json() const {
      return "

      { \"test\" : '\"' }

      ";
      }
      };

      and the output is

      JsonTests::FromJsonTests::QuoteTest6 Expected: !expected.woCompare( actual ) @src/mongo/dbtests/jsontests.cpp:439

      Show
      add the following test to jsontests.cpp class QuoteTest6 : public Base { virtual BSONObj bson() const { BSONObjBuilder b; b.append("test", '"'); return b.obj(); } virtual string json() const { return " { \"test\" : '\"' } "; } }; and the output is JsonTests::FromJsonTests::QuoteTest6 Expected: !expected.woCompare( actual ) @src/mongo/dbtests/jsontests.cpp:439

    Attachments

      Activity

        People

          sverch Shaun Verch
          andrew.emil@10gen.com Andrew Emil (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

            Created:
            Updated:
            Resolved: