Struct JsonSerializationContext<TValue>
The Json
Implements
Inherited Members
Namespace: Unity.Serialization.Json
Assembly: Unity.Serialization.dll
Syntax
public readonly struct JsonSerializationContext<TValue> : IJsonSerializationContext
Type Parameters
Name | Description |
---|---|
TValue | The value type being serialized. |
Properties
Writer
Gets the underlying Json
Declaration
public JsonWriter Writer { get; }
Property Value
Type | Description |
---|---|
Json |
Methods
ContinueVisitation()
Continues visitation for the current type. This will run the next adapter in the sequence, or the default behaviour.
Declaration
public void ContinueVisitation()
ContinueVisitationWithoutAdapters()
Continues visitation for the current type without running any more adapters. This will perform the default behaviour.
Declaration
public void ContinueVisitationWithoutAdapters()
SerializeValue<T>(string, T)
Writes the given key
-value
pair to the output. This will run all adapters.
Declaration
public 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. This will run all adapters.
Declaration
public 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. |