Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-4769

Support parsing $regex query operator appearing in Extended JSON

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Unknown Unknown
    • None
    • None
    • Extended JSON
    • None

    Description

      libbson currently provides no mechanism that would allow parsing a $regex query operator in an Extended JSON document, as it always interprets it as legacy BSON gegex type.

      Quoting Parsers from the Extended JSON spec:

      A parser that accepts Legacy Extended JSON MUST be configurable such that a JSON text of a MongoDB query filter containing the regex query operator can be parsed, e.g.:

      { "$regex": {
          "$regularExpression" : { "pattern": "foo*", "options": "" }
        },
        "$options" : "ix"
      }
      

      or:

      { "$regex": {
          "$regularExpression" : { "pattern": "foo*", "options": "" }
        }
      }
      

      This is also discussed in:

      Attachments

        Activity

          People

            Unassigned Unassigned
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: