Interface IJsonSerializationContext
The IJsonSerializationContext provides an untyped context for contravariant serialization adapters.
Namespace: Unity.Serialization.Json
Assembly: Unity.Serialization.dll
Syntax
public interface IJsonSerializationContext
Properties
Writer
Gets the underlying JsonWriter which can be used to output formatted data.
Declaration
JsonWriter Writer { get; }
Property Value
| Type | Description |
|---|---|
| JsonWriter |
Methods
ContinueVisitation()
Continues serialization for the current value. This will run the next adapter in the sequence, or the default behaviour.
Declaration
void ContinueVisitation()
ContinueVisitationWithoutAdapters()
Continues serialization for the current type without running any more adapters. This will perform the default behaviour.
Declaration
void ContinueVisitationWithoutAdapters()
SerializeValue<T>(string, T)
Writes the given key-value pair to the output. This will run all adapters.
Declaration
void SerializeValue<T>(string key, T value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | key | The key to write. |
| T | value | The value to write. |
Type Parameters
| Name | Description |
|---|---|
| T | The value type to write. |
SerializeValue<T>(T)
Writes the given value to the output using all adapters.
Declaration
void SerializeValue<T>(T value)
Parameters
| Type | Name | Description |
|---|---|---|
| T | value | The value to write. |
Type Parameters
| Name | Description |
|---|---|
| T | The value type to write. |