DefaultContractResolver Constructor (shareCache)

Json.NET

Json.NET - Quick Starts & API Documentation DefaultContractResolver Constructor (shareCache)
NamespacesNewtonsoft.Json.SerializationDefaultContractResolverDefaultContractResolver(Boolean)
Initializes a new instance of the DefaultContractResolver class.
Declaration Syntax
C# Visual Basic Visual C++
public DefaultContractResolver(
	bool shareCache
)
Public Sub New ( _
	shareCache As Boolean _
)
public:
DefaultContractResolver(
	bool shareCache
)
Parameters
shareCache (Boolean)
If set to true the DefaultContractResolver will use a cached shared with other resolvers of the same type. Sharing the cache will significantly performance because expensive reflection will only happen once but could cause unexpected behavior if different instances of the resolver are suppose to produce different results. When set to false it is highly recommended to reuse DefaultContractResolver instances with the JsonSerializer.

Assembly: Newtonsoft.Json (Module: Newtonsoft.Json) Version: 4.5.0.0 (4.5.6.14930)