MongoDB\BSON\toJSONReturns the JSON representation of a BSON value Beschreibung
string MongoDB\BSON\toJSON
( string
$bson
)Converts a BSON string to its » extended JSON representation. Parameter-Liste
RückgabewerteThe converted JSON value. Fehler/ExceptionsThrows MongoDB\Driver\Exception\UnexpectedValueException if the input did not contain exactly one BSON document. Possible reasons include, but are not limited to, invalid BSON, extra data (after reading one BSON document), or an unexpected » libbson error. BeispieleBeispiel #1 MongoDB\BSON\toJSON example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
{ "_id" : { "$oid" : "56315a7c6118fd1b920270b1" } }
Siehe auch
|