#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
namespace Newtonsoft.Json.Serialization
{
///
/// Maps a JSON property to a .NET member.
///
public class JsonProperty
{
///
/// Gets the name of the property.
///
/// The name of the property.
public string PropertyName { get; set; }
///
/// Gets the that will get and set the during serialization.
///
/// The that will get and set the during serialization.
public IValueProvider ValueProvider { get; set; }
///
/// Gets or sets the type of the property.
///
/// The type of the property.
public Type PropertyType { get; set; }
///
/// Gets or sets the for the property.
/// If set this converter takes presidence over the contract converter for the property type.
///
/// The converter.
public JsonConverter Converter { get; set; }
///
/// Gets a value indicating whether this is ignored.
///
/// true if ignored; otherwise, false.
public bool Ignored { get; set; }
///
/// Gets a value indicating whether this is readable.
///
/// true if readable; otherwise, false.
public bool Readable { get; set; }
///
/// Gets a value indicating whether this is writable.
///
/// true if writable; otherwise, false.
public bool Writable { get; set; }
///
/// Gets the member converter.
///
/// The member converter.
public JsonConverter MemberConverter { get; set; }
///
/// Gets the default value.
///
/// The default value.
public object DefaultValue { get; set; }
///
/// Gets a value indicating whether this is required.
///
/// A value indicating whether this is required.
public Required Required { get; set; }
///
/// Gets a value indicating whether this property preserves object references.
///
///
/// true if this instance is reference; otherwise, false.
///
public bool? IsReference { get; set; }
///
/// Gets the property null value handling.
///
/// The null value handling.
public NullValueHandling? NullValueHandling { get; set; }
///
/// Gets the property default value handling.
///
/// The default value handling.
public DefaultValueHandling? DefaultValueHandling { get; set; }
///
/// Gets the property reference loop handling.
///
/// The reference loop handling.
public ReferenceLoopHandling? ReferenceLoopHandling { get; set; }
///
/// Gets the property object creation handling.
///
/// The object creation handling.
public ObjectCreationHandling? ObjectCreationHandling { get; set; }
///
/// Gets or sets the type name handling.
///
/// The type name handling.
public TypeNameHandling? TypeNameHandling { get; set; }
///
/// Gets or sets a predicate used to determine whether the property should be serialize.
///
/// A predicate used to determine whether the property should be serialize.
public Predicate