The default JsonContractResolver used by RavenDB will serialize all properties and all public fields. You can change it by providing own implementation of IContractResolver interface:
Conventions.JsonContractResolver = new CustomJsonContractResolver();
public class CustomJsonContractResolver : IContractResolver
public JsonContract ResolveContract(Type type)
throw new CodeOmitted();
Controls whatever properties that were not de-serialized to an object properties will be preserved
during saving a document again. If false, those properties will be removed when the document will be saved. Default: true.