Class JsonObjectAttribute
- Namespace
- Newtonsoft.Json
- Assembly
- Newtonsoft.Json.dll
Instructs the JsonSerializer how to serialize the object.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct|AttributeTargets.Interface, AllowMultiple = false)]
public sealed class JsonObjectAttribute : JsonContainerAttribute
- Inheritance
-
JsonObjectAttribute
- Inherited Members
Constructors
JsonObjectAttribute()
Initializes a new instance of the JsonObjectAttribute class.
public JsonObjectAttribute()
JsonObjectAttribute(MemberSerialization)
Initializes a new instance of the JsonObjectAttribute class with the specified member serialization.
public JsonObjectAttribute(MemberSerialization memberSerialization)
Parameters
memberSerialization
MemberSerializationThe member serialization.
JsonObjectAttribute(string)
Initializes a new instance of the JsonObjectAttribute class with the specified container Id.
public JsonObjectAttribute(string id)
Parameters
id
stringThe container Id.
Properties
MemberSerialization
Gets or sets the member serialization.
public MemberSerialization MemberSerialization { get; set; }
Property Value
- MemberSerialization
The member serialization.