/// <inheritdoc />
        public override object Deserialize(string serializedString, Type type)
        {
            new { type }.Must().NotBeNull();

            this.InternalBsonThrowOnUnregisteredTypeIfAppropriate(type);

            if (serializedString == SerializationConfigurationBase.NullSerializedStringValue)
            {
                return(null);
            }

            var document = serializedString.ToBsonDocument();

            return(NaosBsonSerializerHelper.DeserializeFromDocument(document, type));
        }
        /// <inheritdoc />
        public override T Deserialize <T>(string serializedString)
        {
            var objectType = typeof(T);

            this.InternalBsonThrowOnUnregisteredTypeIfAppropriate(objectType);

            if (serializedString == SerializationConfigurationBase.NullSerializedStringValue)
            {
                return(default(T));
            }

            var document = serializedString.ToBsonDocument();

            return(NaosBsonSerializerHelper.DeserializeFromDocument <T>(document));
        }