Json.NET - Quick Starts & API Documentation
DefaultContractResolver Constructor (shareCache)
Namespaces ► Newtonsoft.Json.Serialization ► DefaultContractResolver ► DefaultContractResolver(Boolean)
Initializes a new instance of the DefaultContractResolver class.
Declaration Syntax
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.