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

Add validate method to bsoncxx

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.1.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      we need a validation method for bsoncxx.

      It should probably look something like:

      std::optional<document::view> document::validate(trivial_buffer buf, validator& v);

      Then validator might looks like:

      struct validator {
      bool validate_utf8;
      bool validate_dollar_keys;
      bool validate_dot_keys;
      bool validate_utf8_allow_null;
      std::uint8_t* error;
      }

      on success we return an engaged document::view.

      On error we return an unengaged view, setting the error field in the validator

            Assignee:
            Unassigned Unassigned
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: