Add validate method to bsoncxx

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • 0.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Mira Carey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: