MongoDB\BSON\Document::fromJSON

(mongodb >=1.16.0)

MongoDB\BSON\Document::fromJSONConstruct a new document instance from a JSON string

Description

final static public MongoDB\BSON\Document::fromJSON(string $json): MongoDB\BSON\Document

Converts an » extended JSON string to its BSON representation.

Parameters

json (string)

JSON value to be converted.

Errors/Exceptions

See Also