Skip to content

Instantly share code, notes, and snippets.

@OlegJakushkin
Created April 23, 2014 22:32
Show Gist options
  • Save OlegJakushkin/11234809 to your computer and use it in GitHub Desktop.
Save OlegJakushkin/11234809 to your computer and use it in GitHub Desktop.
#define _CRT_SECURE_NO_WARNINGS
#define STATIC_LIBMONGOCLIENT
#include <iostream>
#include <string>
#include <mongo/bson/bson.h>
int main(){
{
mongo::BSONObjBuilder builder;
mongo::BSONObj obj = builder.append("name", "vasya").obj();
std::cout << obj.jsonString() << std::endl;
}
std::cin.get();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment