diff options
author | Kashish Garg <kashish.garg@mongodb.com> | 2018-08-03 14:40:18 -0400 |
---|---|---|
committer | Kashish Garg <kashish.garg@mongodb.com> | 2018-08-08 11:27:32 -0400 |
commit | f10f21467c2c0ae7586c5c9d327f2328f09d655c (patch) | |
tree | 99421ecd99a59487f2ece30c78b59b644a01639a /src/mongo/bson/bsonobj.h | |
parent | 7a21994a8155f3b237f7c239798b55c7e9f67a7b (diff) | |
download | mongo-f10f21467c2c0ae7586c5c9d327f2328f09d655c.tar.gz |
SERVER-36475 Reduce use of stringstream in BSONObj.jsonString
Diffstat (limited to 'src/mongo/bson/bsonobj.h')
-rw-r--r-- | src/mongo/bson/bsonobj.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h index ee441046c25..2c9f41ceb60 100644 --- a/src/mongo/bson/bsonobj.h +++ b/src/mongo/bson/bsonobj.h @@ -254,6 +254,11 @@ public: int pretty = 0, bool isArray = false) const; + void jsonStringStream(JsonStringFormat format, + int pretty, + bool isArray, + std::stringstream& s) const; + /** note: addFields always adds _id even if not specified */ int addFields(BSONObj& from, std::set<std::string>& fields); /* returns n added */ |