Class SerializationContext
Encapsulates all data required to serialize an object to JSON.
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Manatee.Json.Serialization
Assembly: Manatee.Json.dll
Syntax
public class SerializationContext : SerializationContextBase
Properties
| Improve this Doc View SourceSource
The current value in the object for serialization.
Declaration
public object? Source { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.Object> |
Methods
| Improve this Doc View SourcePop()
Pops details from the context to keep the context in sync with the serialization process.
Declaration
public void Pop()
Push(Type, Type, String, Nullable<Object>)
Pushes new details onto the context to allow for recursive serialization.
Declaration
public void Push(Type inferredType, Type requestedType, string propertyName, object? source)
Parameters
Type | Name | Description |
---|---|---|
System.Type | inferredType | The type to be serialized as inferred by the system. |
System.Type | requestedType | The type to be serialized as requested by the caller. |
System.String | propertyName | The property name or index. Will be appended to the location as a JSON Path segment. |
System.Nullable<System.Object> | source | The object being serialized. |