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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: 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
    • None
    • None
    • None
    • None
    • None
    • None
    • None

          Assignee:
          Shaun Verch (Inactive)
          Reporter:
          Andrew Emil (Inactive)
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: