Class JsonProperty
Maps a JSON property to a .NET member or constructor parameter.
Inheritance
Inherited Members
Namespace: Bayat.Json.Serialization
Assembly: Bayat.Json.Runtime.dll
Syntax
public class JsonProperty
Fields
| Improve this Doc View Source_hasExplicitDefaultValue
Declaration
protected bool _hasExplicitDefaultValue
Field Value
Type | Description |
---|---|
System.Boolean |
_required
Declaration
protected Required? _required
Field Value
Type | Description |
---|---|
System.Nullable<Required> |
_skipPropertyNameEscape
Declaration
protected bool _skipPropertyNameEscape
Field Value
Type | Description |
---|---|
System.Boolean |
Properties
| Improve this Doc View SourceAttributeProvider
Gets or sets the IAttributeProvider for this property.
Declaration
public IAttributeProvider AttributeProvider { get; set; }
Property Value
Type | Description |
---|---|
IAttributeProvider | The IAttributeProvider for this property. |
Converter
Gets or sets the JsonConverter for the property. If set this converter takes presidence over the contract converter for the property type.
Declaration
public JsonConverter Converter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter | The converter. |
DeclaringType
Gets or sets the type that declared this property.
Declaration
public Type DeclaringType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The type that declared this property. |
DefaultValue
Gets the default value.
Declaration
public object DefaultValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value. |
DefaultValueHandling
Gets or sets the property default value handling.
Declaration
public DefaultValueHandling? DefaultValueHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DefaultValueHandling> | The default value handling. |
GetIsSpecified
Gets or sets a predicate used to determine whether the property should be serialized.
Declaration
public Predicate<object> GetIsSpecified { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | A predicate used to determine whether the property should be serialized. |
HasMemberAttribute
Gets or sets a value indicating whether this JsonProperty has a member attribute.
Declaration
public bool HasMemberAttribute { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Ignored
Gets or sets a value indicating whether this JsonProperty is ignored.
Declaration
public bool Ignored { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsReference
Gets or sets a value indicating whether this property preserves object references.
Declaration
public bool? IsReference { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> |
|
ItemConverter
Gets or sets the converter used when serializing the property's collection items.
Declaration
public JsonConverter ItemConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter | The collection's items converter. |
ItemIsReference
Gets or sets whether this property's collection items are serialized as a reference.
Declaration
public bool? ItemIsReference { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Boolean> | Whether this property's collection items are serialized as a reference. |
ItemReferenceLoopHandling
Gets or sets the the reference loop handling used when serializing the property's collection items.
Declaration
public ReferenceLoopHandling? ItemReferenceLoopHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<ReferenceLoopHandling> | The collection's items reference loop handling. |
ItemTypeNameHandling
Gets or sets the the type name handling used when serializing the property's collection items.
Declaration
public TypeNameHandling? ItemTypeNameHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<TypeNameHandling> | The collection's items type name handling. |
MemberConverter
Gets or sets the member converter.
Declaration
public JsonConverter MemberConverter { get; set; }
Property Value
Type | Description |
---|---|
JsonConverter | The member converter. |
NullValueHandling
Gets or sets the property null value handling.
Declaration
public NullValueHandling? NullValueHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<NullValueHandling> | The null value handling. |
ObjectCreationHandling
Gets or sets the property object creation handling.
Declaration
public ObjectCreationHandling? ObjectCreationHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<ObjectCreationHandling> | The object creation handling. |
Order
Gets or sets the order of serialization of a member.
Declaration
public int? Order { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Int32> | The numeric order of serialization. |
PropertyContract
Declaration
public JsonContract PropertyContract { get; set; }
Property Value
Type | Description |
---|---|
JsonContract |
PropertyName
Gets or sets the name of the property.
Declaration
public string PropertyName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the property. |
PropertyType
Gets or sets the type of the property.
Declaration
public Type PropertyType { get; set; }
Property Value
Type | Description |
---|---|
System.Type | The type of the property. |
Readable
Gets or sets a value indicating whether this JsonProperty is readable.
Declaration
public bool Readable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ReferenceLoopHandling
Gets or sets the property reference loop handling.
Declaration
public ReferenceLoopHandling? ReferenceLoopHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<ReferenceLoopHandling> | The reference loop handling. |
Required
Gets or sets a value indicating whether this JsonProperty is required.
Declaration
public Required Required { get; set; }
Property Value
Type | Description |
---|---|
Required | A value indicating whether this JsonProperty is required. |
SetIsSpecified
Gets or sets an action used to set whether the property has been deserialized.
Declaration
public Action<object, object> SetIsSpecified { get; set; }
Property Value
Type | Description |
---|---|
System.Action<System.Object, System.Object> | An action used to set whether the property has been deserialized. |
ShouldDeserialize
Gets or sets a predicate used to determine whether the property should be deserialized.
Declaration
public Predicate<object> ShouldDeserialize { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | A predicate used to determine whether the property should be deserialized. |
ShouldSerialize
Gets or sets a predicate used to determine whether the property should be serialize.
Declaration
public Predicate<object> ShouldSerialize { get; set; }
Property Value
Type | Description |
---|---|
System.Predicate<System.Object> | A predicate used to determine whether the property should be serialize. |
TypeNameHandling
Gets or sets or sets the type name handling.
Declaration
public TypeNameHandling? TypeNameHandling { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<TypeNameHandling> | The type name handling. |
UnderlyingName
Gets or sets the name of the underlying member or parameter.
Declaration
public string UnderlyingName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the underlying member or parameter. |
ValueProvider
Gets the IValueProvider that will get and set the JsonProperty during serialization.
Declaration
public IValueProvider ValueProvider { get; set; }
Property Value
Type | Description |
---|---|
IValueProvider | The IValueProvider that will get and set the JsonProperty during serialization. |
Writable
Gets or sets a value indicating whether this JsonProperty is writable.
Declaration
public bool Writable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Methods
| Improve this Doc View SourceGetResolvedDefaultValue()
Declaration
public object GetResolvedDefaultValue()
Returns
Type | Description |
---|---|
System.Object |
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
WritePropertyName(JsonWriter)
Declaration
public void WritePropertyName(JsonWriter writer)
Parameters
Type | Name | Description |
---|---|---|
JsonWriter | writer |