Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class Newtonsoft.​Json.​Serialization.​CamelCasePropertyNamesContractResolver
Assembly: Newtonsoft.Json
Inheritance: object → DefaultContractResolver → CamelCasePropertyNamesContractResolver
Implemented Interfaces
- IContractResolver Implemented by: DefaultContractResolver
Resolves member mappings for a type, camel casing property names.
Properties
public
bool
DynamicCodeGeneration
Gets a value indicating whether members are being get and set using dynamic code generation.
This value is determined by the runtime permissions available.
public
bool
SerializeCompilerGeneratedMembers
Gets or sets a value indicating whether compiler generated members should be serialized.
public
bool
IgnoreSerializableInterface
Gets or sets a value indicating whether to ignore the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface when serializing and deserializing types.
public
bool
IgnoreSerializableAttribute
Gets or sets a value indicating whether to ignore the <see cref="T:System.SerializableAttribute" /> attribute when serializing and deserializing types.
public
NamingStrategy
NamingStrategy
Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized.
Methods
public
JsonContract
ResolveContract​(System.​Type type)
Resolves the contract for a given type.
Returns The contract for a given type.
type
The type to resolve a contract for.
protected
System.​Collections.​Generic.​List<​System.​Reflection.​MemberInfo>
GetSerializableMembers​(System.​Type objectType)
Inherited from DefaultContractResolver
Gets the serializable members for the type.
Returns The serializable members for the type.
objectType
The type to get serializable members for.
protected
JsonObjectContract
CreateObjectContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonObjectContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonObjectContract" /> for the given type.
objectType
Type of the object.
protected
System.​Collections.​Generic.​IList<​JsonProperty>
CreateConstructorParameters​(System.​Reflection.​ConstructorInfo constructor,
JsonPropertyCollection memberProperties)
Inherited from DefaultContractResolver
Creates the constructor parameters.
Returns Properties for the given <see cref="T:System.Reflection.ConstructorInfo" /> .
constructor
The constructor to create properties for.
memberProperties
The type's member properties.
protected
JsonProperty
CreatePropertyFromConstructorParameter​(JsonProperty matchingMemberProperty,
System.​Reflection.​ParameterInfo parameterInfo)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.ParameterInfo" /> .
Returns A created <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.ParameterInfo" /> .
matchingMemberProperty
The matching member property.
parameterInfo
The constructor parameter.
protected
JsonConverter
ResolveContractConverter​(System.​Type objectType)
Inherited from DefaultContractResolver
Resolves the default <see cref="T:Newtonsoft.Json.JsonConverter" /> for the contract.
Returns The contract's default <see cref="T:Newtonsoft.Json.JsonConverter" /> .
objectType
Type of the object.
protected
JsonDictionaryContract
CreateDictionaryContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonDictionaryContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonDictionaryContract" /> for the given type.
objectType
Type of the object.
protected
JsonArrayContract
CreateArrayContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonArrayContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonArrayContract" /> for the given type.
objectType
Type of the object.
protected
JsonPrimitiveContract
CreatePrimitiveContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonPrimitiveContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonPrimitiveContract" /> for the given type.
objectType
Type of the object.
protected
JsonLinqContract
CreateLinqContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonLinqContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonLinqContract" /> for the given type.
objectType
Type of the object.
protected
JsonISerializableContract
CreateISerializableContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonISerializableContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonISerializableContract" /> for the given type.
objectType
Type of the object.
protected
JsonDynamicContract
CreateDynamicContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonDynamicContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonDynamicContract" /> for the given type.
objectType
Type of the object.
protected
JsonStringContract
CreateStringContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonStringContract" /> for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonStringContract" /> for the given type.
objectType
Type of the object.
protected
JsonContract
CreateContract​(System.​Type objectType)
Inherited from DefaultContractResolver
Determines which contract type is created for the given type.
Returns A <see cref="T:Newtonsoft.Json.Serialization.JsonContract" /> for the given type.
objectType
Type of the object.
protected
System.​Collections.​Generic.​IList<​JsonProperty>
CreateProperties​(System.​Type type,
MemberSerialization memberSerialization)
Inherited from DefaultContractResolver
Creates properties for the given <see cref="T:Newtonsoft.Json.Serialization.JsonContract" /> .
Returns Properties for the given <see cref="T:Newtonsoft.Json.Serialization.JsonContract" /> .
type
The type to create properties for.
memberSerialization
The member serialization mode for the type.
protected
IValueProvider
CreateMemberValueProvider​(System.​Reflection.​MemberInfo member)
Inherited from DefaultContractResolver
Creates the <see cref="T:Newtonsoft.Json.Serialization.IValueProvider" /> used by the serializer to get and set values from a member.
Returns The <see cref="T:Newtonsoft.Json.Serialization.IValueProvider" /> used by the serializer to get and set values from a member.
member
The member.
protected
JsonProperty
CreateProperty​(System.​Reflection.​MemberInfo member,
MemberSerialization memberSerialization)
Inherited from DefaultContractResolver
Creates a <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.MemberInfo" /> .
Returns A created <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for the given <see cref="T:System.Reflection.MemberInfo" /> .
member
The member to create a <see cref="T:Newtonsoft.Json.Serialization.JsonProperty" /> for.
memberSerialization
The member's parent <see cref="T:Newtonsoft.Json.MemberSerialization" /> .
protected
string
ResolvePropertyName​(string propertyName)
Inherited from DefaultContractResolver
Resolves the name of the property.
Returns Resolved name of the property.
propertyName
Name of the property.
protected
string
ResolveExtensionDataName​(string extensionDataName)
Inherited from DefaultContractResolver
Resolves the name of the extension data. By default no changes are made to extension data names.
Returns Resolved name of the extension data.
extensionDataName
Name of the extension data.
protected
string
ResolveDictionaryKey​(string dictionaryKey)
Inherited from DefaultContractResolver
Resolves the key of the dictionary. By default <see cref="M:Newtonsoft.Json.Serialization.DefaultContractResolver.ResolvePropertyName(System.String)" /> is used to resolve dictionary keys.
Returns Resolved key of the dictionary.
dictionaryKey
Key of the dictionary.
public
string
GetResolvedPropertyName​(string propertyName)
Inherited from DefaultContractResolver
Gets the resolved name of the property.
Returns Name of the property.
propertyName
Name of the property.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object