Show / Hide Table of Contents

Class SerializationContext

Encapsulates all data required to serialize an object to JSON.

Inheritance
System.Object
SerializationContextBase
SerializationContext
Inherited Members
SerializationContextBase.InferredType
SerializationContextBase.RequestedType
SerializationContextBase.CurrentLocation
SerializationContextBase.RootSerializer
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 Source

Source

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 Source

Pop()

Pops details from the context to keep the context in sync with the serialization process.

Declaration
public void Pop()
| Improve this Doc View Source

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.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX