# Clase și funcții de serializare de tip BSON

- Funcții
  - MongoDB\BSON\fromJSON — Returns the BSON representation of a JSON value
  - MongoDB\BSON\fromPHP — Returns the BSON representation of a PHP value
  - MongoDB\BSON\toCanonicalExtendedJSON — Returns the Canonical Extended JSON representation of a BSON value
  - MongoDB\BSON\toJSON — Returns the Legacy Extended JSON representation of a BSON value
  - MongoDB\BSON\toPHP — Returns the PHP representation of a BSON value
  - MongoDB\BSON\toRelaxedExtendedJSON — Returns the Relaxed Extended JSON representation of a BSON value
- MongoDB\BSON\Binary — The MongoDB\BSON\Binary class
  - MongoDB\BSON\Binary::__construct — Construct a new Binary
  - MongoDB\BSON\Binary::getData — Returns the Binary's data
  - MongoDB\BSON\Binary::getType — Returns the Binary's type
  - MongoDB\BSON\Binary::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\Binary::serialize — Serialize a Binary
  - MongoDB\BSON\Binary::__toString — Returns the Binary's data
  - MongoDB\BSON\Binary::unserialize — Unserialize a Binary
- MongoDB\BSON\Javascript — The MongoDB\BSON\Javascript class
  - MongoDB\BSON\Javascript::__construct — Construct a new Javascript
  - MongoDB\BSON\Javascript::getCode — Returns the Javascript's code
  - MongoDB\BSON\Javascript::getScope — Returns the Javascript's scope document
  - MongoDB\BSON\Javascript::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\Javascript::serialize — Serialize a Javascript
  - MongoDB\BSON\Javascript::__toString — Returns the Javascript's code
  - MongoDB\BSON\Javascript::unserialize — Unserialize a Javascript
- MongoDB\BSON\MaxKey — The MongoDB\BSON\MaxKey class
  - MongoDB\BSON\MaxKey::__construct — Construct a new MaxKey
  - MongoDB\BSON\MaxKey::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\MaxKey::serialize — Serialize a MaxKey
  - MongoDB\BSON\MaxKey::unserialize — Unserialize a MaxKey
- MongoDB\BSON\MinKey — The MongoDB\BSON\MinKey class
  - MongoDB\BSON\MinKey::__construct — Construct a new MinKey
  - MongoDB\BSON\MinKey::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\MinKey::serialize — Serialize a MinKey
  - MongoDB\BSON\MinKey::unserialize — Unserialize a MinKey
- MongoDB\BSON\ObjectId — The MongoDB\BSON\ObjectId class
  - MongoDB\BSON\ObjectId::__construct — Construct a new ObjectId
  - MongoDB\BSON\ObjectId::getTimestamp — Returns the timestamp component of this ObjectId
  - MongoDB\BSON\ObjectId::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\ObjectId::serialize — Serialize an ObjectId
  - MongoDB\BSON\ObjectId::__toString — Returns the hexidecimal representation of this ObjectId
  - MongoDB\BSON\ObjectId::unserialize — Unserialize an ObjectId
- MongoDB\BSON\Regex — The MongoDB\BSON\Regex class
  - MongoDB\BSON\Regex::__construct — Construct a new Regex
  - MongoDB\BSON\Regex::getFlags — Returns the Regex's flags
  - MongoDB\BSON\Regex::getPattern — Returns the Regex's pattern
  - MongoDB\BSON\Regex::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\Regex::serialize — Serialize a Regex
  - MongoDB\BSON\Regex::__toString — Returns the string representation of this Regex
  - MongoDB\BSON\Regex::unserialize — Unserialize a Regex
- MongoDB\BSON\Timestamp — The MongoDB\BSON\Timestamp class
  - MongoDB\BSON\Timestamp::__construct — Construct a new Timestamp
  - MongoDB\BSON\Timestamp::getIncrement — Returns the increment component of this Timestamp
  - MongoDB\BSON\Timestamp::getTimestamp — Returns the timestamp component of this Timestamp
  - MongoDB\BSON\Timestamp::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\Timestamp::serialize — Serialize a Timestamp
  - MongoDB\BSON\Timestamp::__toString — Returns the string representation of this Timestamp
  - MongoDB\BSON\Timestamp::unserialize — Unserialize a Timestamp
- MongoDB\BSON\UTCDateTime — The MongoDB\BSON\UTCDateTime class
  - MongoDB\BSON\UTCDateTime::__construct — Construct a new UTCDateTime
  - MongoDB\BSON\UTCDateTime::jsonSerialize — Returns a representation that can be converted to JSON
  - MongoDB\BSON\UTCDateTime::serialize — Serialize a UTCDateTime
  - MongoDB\BSON\UTCDateTime::toDateTime — Returns the DateTime representation of this UTCDateTime
  - MongoDB\BSON\UTCDateTime::__toString — Returns the string representation of this UTCDateTime
  - MongoDB\BSON\UTCDateTime::unserialize — Unserialize a UTCDateTime
- MongoDB\BSON\Type — The MongoDB\BSON\Type interface
- MongoDB\BSON\Persistable — The MongoDB\BSON\Persistable interface
- MongoDB\BSON\Serializable — The MongoDB\BSON\Serializable interface
  - MongoDB\BSON\Serializable::bsonSerialize — Provides an array or document to serialize as BSON
- MongoDB\BSON\Unserializable — The MongoDB\BSON\Unserializable interface
  - MongoDB\BSON\Unserializable::bsonUnserialize — Constructs the object from a BSON array or document