MongoDB\BSON\Javascript::jsonSerialize Returns a representation that can be converted to JSON &reftitle.description; final public mixedMongoDB\BSON\Javascript::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\Javascript. &mongodb.note.extended-json; &reftitle.errors; &mongodb.throws.argumentparsing; &reftitle.seealso; JsonSerializable::jsonSerialize json_encode MongoDB\BSON\toCanonicalExtendedJSON MongoDB\BSON\toRelaxedExtendedJSON MongoDB Extended JSON