Class JsonObjectContract
Contract details for a System.Type used by the JsonSerializer.
Inherited Members
Namespace: Bayat.Json.Serialization
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JsonObjectContract : JsonContainerContract
Constructors
| Improve this Doc View SourceJsonObjectContract(Type)
Initializes a new instance of the JsonObjectContract class.
Declaration
public JsonObjectContract(Type underlyingType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | underlyingType | The underlying type for the contract. |
Fields
| Improve this Doc View SourceExtensionDataIsJToken
Declaration
public bool ExtensionDataIsJToken
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
| Improve this Doc View SourceConstructorParameters
Gets the constructor parameters required for any non-default constructor
Declaration
[Obsolete("ConstructorParameters is obsolete. Use CreatorParameters instead.")]
public JsonPropertyCollection ConstructorParameters { get; }
Property Value
Type | Description |
---|---|
JsonPropertyCollection |
CreatorParameters
Gets a collection of JsonProperty instances that define the parameters used with OverrideCreator.
Declaration
public JsonPropertyCollection CreatorParameters { get; }
Property Value
Type | Description |
---|---|
JsonPropertyCollection |
ExtensionDataGetter
Gets or sets the extension data getter.
Declaration
public ExtensionDataGetter ExtensionDataGetter { get; set; }
Property Value
Type | Description |
---|---|
ExtensionDataGetter |
ExtensionDataSetter
Gets or sets the extension data setter.
Declaration
public ExtensionDataSetter ExtensionDataSetter { get; set; }
Property Value
Type | Description |
---|---|
ExtensionDataSetter |
ExtensionDataValueType
Gets or sets the extension data value type.
Declaration
public Type ExtensionDataValueType { get; set; }
Property Value
Type | Description |
---|---|
System.Type |
HasRequiredOrDefaultValueProperties
Declaration
public bool HasRequiredOrDefaultValueProperties { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
ItemRequired
Gets or sets a value that indicates whether the object's properties are required.
Declaration
public Required? ItemRequired { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Required> | A value indicating whether the object's properties are required. |
MemberSerialization
Gets or sets the object member serialization.
Declaration
public MemberSerialization MemberSerialization { get; set; }
Property Value
Type | Description |
---|---|
MemberSerialization | The member object serialization. |
OverrideConstructor
Gets or sets the override constructor used to create the object. This is set when a constructor is marked up using the JsonConstructor attribute.
Declaration
[Obsolete("OverrideConstructor is obsolete. Use OverrideCreator instead.")]
public ConstructorInfo OverrideConstructor { get; set; }
Property Value
Type | Description |
---|---|
System.Reflection.ConstructorInfo | The override constructor. |
OverrideCreator
Gets or sets the function used to create the object. When set this function will override DefaultCreator. This function is called with a collection of arguments which are defined by the CreatorParameters collection.
Declaration
public ObjectConstructor<object> OverrideCreator { get; set; }
Property Value
Type | Description |
---|---|
ObjectConstructor<System.Object> | The function used to create the object. |
ParameterizedCreator
Declaration
public ObjectConstructor<object> ParameterizedCreator { get; }
Property Value
Type | Description |
---|---|
ObjectConstructor<System.Object> |
ParametrizedConstructor
Gets or sets the parametrized constructor used to create the object.
Declaration
[Obsolete("ParametrizedConstructor is obsolete. Use OverrideCreator instead.")]
public ConstructorInfo ParametrizedConstructor { get; set; }
Property Value
Type | Description |
---|---|
System.Reflection.ConstructorInfo | The parametrized constructor. |
Properties
Gets the object's properties.
Declaration
public JsonPropertyCollection Properties { get; }
Property Value
Type | Description |
---|---|
JsonPropertyCollection | The object's properties. |
Methods
| Improve this Doc View SourceGetUninitializedObject()
Declaration
public object GetUninitializedObject()
Returns
Type | Description |
---|---|
System.Object |