LocalizedContractResolver

Prev Next

A Json.NET contract resolver that localizes property names using DisplayAttribute and ensures enums are serialized using a display-name based converter. Usage: var settings = new JsonSerializerSettings { ContractResolver = new LocalizedDisplayNameContractResolver(CultureInfo.GetCultureInfo("de")) }; JsonConvert.SerializeObject(obj, settings);

Properties

Property Type Description Details
DynamicCodeGeneration boolean Computed (read-only)
IgnoreIsSpecifiedMembers boolean
IgnoreSerializableAttribute boolean
IgnoreSerializableInterface boolean
IgnoreShouldSerializeMembers boolean
NamingStrategy NamingStrategy
SerializeCompilerGeneratedMembers boolean
DefaultMembersSearchFlags BindingFlags Deprecated: DefaultMembersSearchFlags is obsolete. To modify the members serialized inherit from DefaultContractResolver and override the GetSerializableMembers method instead.

Package: HomagGroup.HomagConnect.Base.Contracts 2.2.5-preview.98

Source: LocalizedContractResolver.cs