MongoDB\BSON\fromJSON Returns the BSON representation of a JSON value &reftitle.description; stringMongoDB\BSON\fromJSON stringjson Converts an extended JSON string to its BSON representation. &reftitle.parameters; json (string) JSON value to be converted. &reftitle.returnvalues; The serialized BSON document as a binary string. &reftitle.errors; Throws MongoDB\Driver\Exception\UnexpectedValueException if the JSON value cannot be converted to BSON (e.g. due to a syntax error). &reftitle.examples; <function>MongoDB\BSON\fromJSON</function> example ]]> &example.outputs; object(MongoDB\BSON\ObjectId)#1 (1) { ["oid"]=> string(24) "563143b280d2387c91807965" } } ]]> &reftitle.seealso; MongoDB\BSON\toJSON MongoDB Extended JSON MongoDB BSON