[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNewtonsoftJsonContractResolver\u003c/code\u003e class is a JSON contract resolver designed to apply \u003ccode\u003eRFC3339DateTimeConverter\u003c/code\u003e and \u003ccode\u003eExplicitNullConverter\u003c/code\u003e as needed, enhancing JSON serialization and deserialization.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eDefaultContractResolver\u003c/code\u003e and implements \u003ccode\u003eIContractResolver\u003c/code\u003e, offering a specialized approach to contract resolution for JSON operations.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes a \u003ccode\u003eCreateContract\u003c/code\u003e method, which is an override of \u003ccode\u003eDefaultContractResolver.CreateContract(Type)\u003c/code\u003e, allowing it to customize the contract creation process for different object types.\u003c/p\u003e\n"],["\u003cp\u003eThe main purpose of using a contract resolver is to enhance performance in Json.NET, as recommended by its tips.\u003c/p\u003e\n"],["\u003cp\u003eThe class is available across multiple versions, ranging from 1.50.0 to the latest version 1.69.0, allowing for flexibility in implementation with different release versions.\u003c/p\u003e\n"]]],[],null,["# Class NewtonsoftJsonContractResolver (1.69.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.69.0 (latest)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Json.NewtonsoftJsonContractResolver)\n- [1.68.0](/dotnet/docs/reference/Google.Apis/1.68.0/Google.Apis.Json.NewtonsoftJsonContractResolver)\n- [1.60.0](/dotnet/docs/reference/Google.Apis/1.60.0/Google.Apis.Json.NewtonsoftJsonContractResolver)\n- [1.59.0](/dotnet/docs/reference/Google.Apis/1.59.0/Google.Apis.Json.NewtonsoftJsonContractResolver)\n- [1.55.0](/dotnet/docs/reference/Google.Apis/1.55.0/Google.Apis.Json.NewtonsoftJsonContractResolver)\n- [1.50.0](/dotnet/docs/reference/Google.Apis/1.50.0/Google.Apis.Json.NewtonsoftJsonContractResolver) \n\n public class NewtonsoftJsonContractResolver : DefaultContractResolver, IContractResolver\n\nA JSON contract resolver to apply [RFC3339DateTimeConverter](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Json.RFC3339DateTimeConverter) and [ExplicitNullConverter](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Json.NewtonsoftJsonContractResolver#Google_Apis_Json_NewtonsoftJsonContractResolver_ExplicitNullConverter) as necessary. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Newtonsoft.Json.Serialization.DefaultContractResolver \\\u003e NewtonsoftJsonContractResolver \n\nImplements\n----------\n\nNewtonsoft.Json.Serialization.IContractResolver \n\nInherited Members\n-----------------\n\n[DefaultContractResolver.ResolveContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.GetSerializableMembers(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateObjectContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateConstructorParameters(ConstructorInfo, JsonPropertyCollection)](https://learn.microsoft.com/dotnet/api/system.reflection.constructorinfo) \n[DefaultContractResolver.CreatePropertyFromConstructorParameter(JsonProperty, ParameterInfo)](https://learn.microsoft.com/dotnet/api/system.reflection.parameterinfo) \n[DefaultContractResolver.ResolveContractConverter(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateDictionaryContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateArrayContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreatePrimitiveContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateLinqContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateISerializableContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateDynamicContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateStringContract(Type)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateProperties(Type, MemberSerialization)](https://learn.microsoft.com/dotnet/api/system.type) \n[DefaultContractResolver.CreateMemberValueProvider(MemberInfo)](https://learn.microsoft.com/dotnet/api/system.reflection.memberinfo) \n[DefaultContractResolver.CreateProperty(MemberInfo, MemberSerialization)](https://learn.microsoft.com/dotnet/api/system.reflection.memberinfo) \n[DefaultContractResolver.ResolvePropertyName(string)](https://learn.microsoft.com/dotnet/api/system.string) \n[DefaultContractResolver.ResolveExtensionDataName(string)](https://learn.microsoft.com/dotnet/api/system.string) \n[DefaultContractResolver.ResolveDictionaryKey(string)](https://learn.microsoft.com/dotnet/api/system.string) \n[DefaultContractResolver.GetResolvedPropertyName(string)](https://learn.microsoft.com/dotnet/api/system.string) \nNewtonsoft.Json.Serialization.DefaultContractResolver.DynamicCodeGeneration \nNewtonsoft.Json.Serialization.DefaultContractResolver.DefaultMembersSearchFlags \nNewtonsoft.Json.Serialization.DefaultContractResolver.SerializeCompilerGeneratedMembers \nNewtonsoft.Json.Serialization.DefaultContractResolver.IgnoreSerializableInterface \nNewtonsoft.Json.Serialization.DefaultContractResolver.IgnoreSerializableAttribute \nNewtonsoft.Json.Serialization.DefaultContractResolver.IgnoreIsSpecifiedMembers \nNewtonsoft.Json.Serialization.DefaultContractResolver.IgnoreShouldSerializeMembers \nNewtonsoft.Json.Serialization.DefaultContractResolver.NamingStrategy \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Apis.Json](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Json)\n\nAssembly\n--------\n\nGoogle.Apis.Core.dll\n\nRemarks\n-------\n\nUsing a contract resolver is recommended in the Json.NET performance tips: \u003chttps://www.newtonsoft.com/json/help/html/Performance.htm#JsonConverters\u003e\n\nMethods\n-------\n\n### CreateContract(Type)\n\n protected override JsonContract CreateContract(Type objectType)\n\nDetermines which contract type is created for the given type.\n\n**Overrides** \n[DefaultContractResolver.CreateContract(Type)](https://learn.microsoft.com/dotnet/api/system.type)\n\nExtension Method\n----------------\n\n[Utilities.ThrowIfNull\\\u003cT\\\u003e(T, string)](/dotnet/docs/reference/Google.Apis/latest/Google.Apis.Util.Utilities#Google_Apis_Util_Utilities_ThrowIfNull__1___0_System_String_)"]]