MongoDB\BSON\Regex::jsonSerialize

Returns a representation that can be converted to JSON

&reftitle.description; final public `mixed` `MongoDB\BSON\Regex::jsonSerialize`
&reftitle.parameters; &no.function.parameters;
&reftitle.returnvalues;

Returns data which can be serialized by `json_encode` to produce an extended JSON representation of the `MongoDB\BSON\Regex`.

&mongodb.note.extended-json;
&reftitle.errors;

&mongodb.throws.argumentparsing;

&reftitle.seealso;

- `JsonSerializable::jsonSerialize`
- `json_encode`
- `MongoDB\BSON\toCanonicalExtendedJSON`
- `MongoDB\BSON\toRelaxedExtendedJSON`
- MongoDB Extended JSON