Class JsonContainerAttribute
Instructs the Json
Inheritance
Implements
Inherited Members
Namespace: Bayat.Json
Assembly: Bayat.Json.Runtime.dll
Syntax
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, AllowMultiple = false)]
public abstract class JsonContainerAttribute : Attribute, _Attribute
Constructors
| Improve this Doc View SourceJsonContainerAttribute()
Initializes a new instance of the Json
Declaration
protected JsonContainerAttribute()
JsonContainerAttribute(String)
Initializes a new instance of the Json
Declaration
protected JsonContainerAttribute(string id)
Parameters
Type | Name | Description |
---|---|---|
System. |
id | The container Id. |
Fields
| Improve this Doc View Source_isReference
Declaration
protected bool? _isReference
Field Value
Type | Description |
---|---|
System. |
_itemIsReference
Declaration
protected bool? _itemIsReference
Field Value
Type | Description |
---|---|
System. |
_itemReferenceLoopHandling
Declaration
protected ReferenceLoopHandling? _itemReferenceLoopHandling
Field Value
Type | Description |
---|---|
System. |
_itemTypeNameHandling
Declaration
protected TypeNameHandling? _itemTypeNameHandling
Field Value
Type | Description |
---|---|
System. |
Properties
| Improve this Doc View SourceDescription
Gets or sets the description.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System. |
The description. |
Id
Gets or sets the id.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
System. |
The id. |
IsReference
Gets or sets a value that indicates whether to preserve object references.
Declaration
public bool IsReference { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
ItemConverterParameters
The parameter list to use when constructing the JsonConverter described by ItemConverterType. If null, the default constructor is used. When non-null, there must be a constructor defined in the JsonConverter that exactly matches the number, order, and type of these parameters.
Declaration
public object[] ItemConverterParameters { get; set; }
Property Value
Type | Description |
---|---|
System. |
Examples
[JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })]
| Improve this Doc View SourceItemConverterType
Gets the collection's items converter.
Declaration
public Type ItemConverterType { get; set; }
Property Value
Type | Description |
---|---|
System. |
The collection's items converter. |
ItemIsReference
Gets or sets a value that indicates whether to preserve collection's items references.
Declaration
public bool ItemIsReference { get; set; }
Property Value
Type | Description |
---|---|
System. |
|
ItemReferenceLoopHandling
Gets or sets the reference loop handling used when serializing the collection's items.
Declaration
public ReferenceLoopHandling ItemReferenceLoopHandling { get; set; }
Property Value
Type | Description |
---|---|
Reference |
The reference loop handling. |
ItemTypeNameHandling
Gets or sets the type name handling used when serializing the collection's items.
Declaration
public TypeNameHandling ItemTypeNameHandling { get; set; }
Property Value
Type | Description |
---|---|
Type |
The type name handling. |
Title
Gets or sets the title.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System. |
The title. |