Details
-
New Feature
-
Resolution: Unresolved
-
Unknown
-
None
-
None
-
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:
- Q&A ("How can implementations which require backwards compatibility...)
- Of Canonical Type Wrapper Formats: RegularExpression
Attachments
Issue Links
- is depended on by
-
PHPC-2316 Ignore $regex when parsing Relaxed Extended JSON
-
- Blocked
-