[CXX-977] bsconcxx::to_json output error, when string value contains " Created: 26/Jul/16  Updated: 26/Jul/16  Resolved: 26/Jul/16

Status: Closed
Project: C++ Driver
Component/s: BSON
Affects Version/s: 3.0.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: itfront Assignee: Backlog - CXX Driver Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

json.cpp should change to replace all occurance of " (the double-quote character) !!

void visit_value(const types::b_utf8& value) {
        std::string str = value.value.to_string().data();
        out << "\"" << replace_all(str, "\"", "\\\"") << "\"";
    }



 Comments   
Comment by David Golden [ 26/Jul/16 ]

Thank you for reporting this. Closing as a duplicate of CXX-941.

Comment by itfront [ 26/Jul/16 ]

should be bsoncxx::to_json

Generated at Wed Feb 07 22:00:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.