Show / Hide Table of Contents

Class DefaultJsonSerializerSettingsProvider

A default JSON serializer settings provider.

Inheritance
System.Object
Loggable
DefaultJsonSerializerSettingsProvider
Implements
ILoggable
IJsonSerializerSettingsProvider
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Serialization.Json
Assembly: Kephas.Serialization.Json.dll
Syntax
public class DefaultJsonSerializerSettingsProvider : Loggable, ILoggable, IJsonSerializerSettingsProvider

Constructors

| Improve this Doc View Source

DefaultJsonSerializerSettingsProvider(ITypeResolver, ILogManager, ICollection<IJsonConverter>)

Initializes a new instance of the DefaultJsonSerializerSettingsProvider class.

Declaration
public DefaultJsonSerializerSettingsProvider(ITypeResolver typeResolver, ILogManager logManager, ICollection<IJsonConverter> jsonConverters = null)
Parameters
Type Name Description
ITypeResolver typeResolver

The type resolver.

ILogManager logManager

Manager for log.

System.Collections.Generic.ICollection<IJsonConverter> jsonConverters

Optional. The JSON converters (optional).

Properties

| Improve this Doc View Source

Instance

Gets the default instance of this settings provider.

Declaration
public static DefaultJsonSerializerSettingsProvider Instance { get; }
Property Value
Type Description
DefaultJsonSerializerSettingsProvider

The instance.

| Improve this Doc View Source

TypeResolver

Gets the type resolver.

Declaration
public ITypeResolver TypeResolver { get; }
Property Value
Type Description
ITypeResolver

The type resolver.

Methods

| Improve this Doc View Source

GetContractResolver(Boolean)

Gets the contract resolver.

Declaration
protected virtual IContractResolver GetContractResolver(bool camelCase)
Parameters
Type Name Description
System.Boolean camelCase

If set to true the camel case will be used for properties.

Returns
Type Description
Newtonsoft.Json.Serialization.IContractResolver

The contract resolver.

| Improve this Doc View Source

GetJsonSerializerSettings()

Gets the JSON serializer settings.

Declaration
public JsonSerializerSettings GetJsonSerializerSettings()
Returns
Type Description
Newtonsoft.Json.JsonSerializerSettings

The JSON serializer settings.

| Improve this Doc View Source

GetJsonSerializerSettings(Boolean, Boolean, IEnumerable<JsonConverter>)

Gets the json serializer settings.

Declaration
protected virtual JsonSerializerSettings GetJsonSerializerSettings(bool camelCase, bool thrownOnMissingMembers = true, IEnumerable<JsonConverter> converters = null)
Parameters
Type Name Description
System.Boolean camelCase

If set to true the ccamel case will be used for properties.

System.Boolean thrownOnMissingMembers

If set to true [thrown on missing members].

System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter> converters

The json converters.

Returns
Type Description
Newtonsoft.Json.JsonSerializerSettings

The json serializer settings.

| Improve this Doc View Source

GetSerializationBinder()

Gets the serialization binder.

Declaration
protected virtual ISerializationBinder GetSerializationBinder()
Returns
Type Description
Newtonsoft.Json.Serialization.ISerializationBinder

The serialization binder.

| Improve this Doc View Source

HandleJsonSerializationError(Object, ErrorEventArgs)

Error handler for json deserialization errors.

Declaration
protected virtual void HandleJsonSerializationError(object sender, ErrorEventArgs args)
Parameters
Type Name Description
System.Object sender

The sender.

Newtonsoft.Json.Serialization.ErrorEventArgs args

The Newtonsoft.Json.Serialization.ErrorEventArgs instance containing the event data.

Implements

ILoggable
IJsonSerializerSettingsProvider

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX