Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1137

Alternative interface via nlohmann/json

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Duplicate
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • BSON

    Description

      nlohmann/json would be a superior bson interface compared to the current stream. It takes advantage of c++11, allowing for something like this:

      json j2 = {
        {"pi", 3.141},
        {"happy", true},
        {"name", "Niels"},
        {"nothing", nullptr},
        {"answer", {
          {"everything", 42}
        }},
        {"list", {1, 0, 2}},
        {"object", {
          {"currency", "USD"},
          {"value", 42.99}
        }}
      };
      

      Attachments

        Activity

          People

            clyde.bazile@mongodb.com Clyde Bazile III (Inactive)
            JoeyAndres Joey Andres
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: