BsonSerializer ClassMongoDB C# Driver API Documentation
A static class that represents the BSON serialization functionality.
Inheritance Hierarchy

SystemObject
  MongoDB.Bson.SerializationBsonSerializer

Namespace: MongoDB.Bson.Serialization
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: { version: '1.11.0.92', semver: '1.11.0', commit: '791a16588d4a8b3b118a8b3b57cfa436fec5d3da', commitDate: '2015-12-08 22:55:45' }
Syntax

public static class BsonSerializer

The BsonSerializer type exposes the following members.

Methods

  NameDescription
Public methodStatic memberDeserialize(Byte, Type)
Deserializes an object from a BSON byte array.
Public methodStatic memberDeserialize(Stream, Type)
Deserializes an object from a BSON Stream.
Public methodStatic memberDeserialize(TextReader, Type)
Deserializes an object from a JSON TextReader.
Public methodStatic memberDeserialize(String, Type)
Deserializes an object from a JSON string.
Public methodStatic memberDeserialize(BsonDocument, Type)
Deserializes an object from a BsonDocument.
Public methodStatic memberDeserialize(BsonReader, Type)
Deserializes an object from a BsonReader.
Public methodStatic memberDeserialize(JsonBuffer, Type)
Deserializes an object from a JsonBuffer.
Public methodStatic memberDeserialize(BsonReader, Type, IBsonSerializationOptions)
Deserializes an object from a BsonReader.
Public methodStatic memberDeserializeTNominalType(Byte)
Deserializes an object from a BSON byte array.
Public methodStatic memberDeserializeTNominalType(Stream)
Deserializes an object from a BSON Stream.
Public methodStatic memberDeserializeTNominalType(TextReader)
Deserializes an object from a JSON TextReader.
Public methodStatic memberDeserializeTNominalType(String)
Deserializes an object from a JSON string.
Public methodStatic memberDeserializeTNominalType(BsonDocument)
Deserializes an object from a BsonDocument.
Public methodStatic memberDeserializeTNominalType(BsonReader)
Deserializes an object from a BsonReader.
Public methodStatic memberDeserializeTNominalType(JsonBuffer)
Deserializes an object from a JsonBuffer.
Public methodStatic memberIsTypeDiscriminated
Returns whether the given type has any discriminators registered for any of its subclasses.
Public methodStatic memberLookupActualType
Looks up the actual type of an object to be deserialized.
Public methodStatic memberLookupDiscriminatorConvention
Looks up the discriminator convention for a type.
Public methodStatic memberLookupGenericSerializerDefinition
Looks up a generic serializer definition.
Public methodStatic memberLookupIdGenerator
Looks up an IdGenerator.
Public methodStatic memberLookupSerializer
Looks up a serializer for a Type.
Public methodStatic memberRegisterDiscriminator
Registers the discriminator for a type.
Public methodStatic memberRegisterDiscriminatorConvention
Registers the discriminator convention for a type.
Public methodStatic memberRegisterGenericSerializerDefinition
Registers a generic serializer definition for a generic type.
Public methodStatic memberRegisterIdGenerator
Registers an IdGenerator for an Id Type.
Public methodStatic memberRegisterSerializationProvider
Registers a serialization provider.
Public methodStatic memberRegisterSerializer
Registers a serializer for a type.
Public methodStatic memberSerialize(BsonWriter, Type, Object)
Serializes an object to a BsonWriter.
Public methodStatic memberSerialize(BsonWriter, Type, Object, IBsonSerializationOptions)
Serializes an object to a BsonWriter.
Public methodStatic memberSerializeTNominalType(BsonWriter, TNominalType)
Serializes an object to a BsonWriter.
Public methodStatic memberSerializeTNominalType(BsonWriter, TNominalType, IBsonSerializationOptions)
Serializes an object to a BsonWriter.
Top
Properties

  NameDescription
Public propertyStatic memberUseNullIdChecker
Gets or sets whether to use the NullIdChecker on reference Id types that don't have an IdGenerator registered.
Public propertyStatic memberUseZeroIdChecker
Gets or sets whether to use the ZeroIdChecker on value Id types that don't have an IdGenerator registered.
Top
See Also

Reference