Interface IJsonAdapter<TValue>
Implement this interface to override serialization and deserialization behaviour for a given type.
Namespace: Unity.Serialization.Json.Adapters
Syntax
public interface IJsonAdapter<TValue> : IJsonAdapter
Type Parameters
| Name | Description | 
|---|---|
| TValue | The type to override serialization for.  | 
Methods
Deserialize(SerializedValueView)
Invoked during deserialization to handle reading the specified TValue.
Declaration
TValue Deserialize(SerializedValueView view)
Parameters
| Type | Name | Description | 
|---|---|---|
| SerializedValueView | view | The view to read from.  | 
Returns
| Type | Description | 
|---|---|
| TValue | The deserialized value.  | 
Serialize(JsonStringBuffer, TValue)
Invoked during serialization to handle writing out the specified TValue.
Declaration
void Serialize(JsonStringBuffer writer, TValue value)
Parameters
| Type | Name | Description | 
|---|---|---|
| JsonStringBuffer | writer | The stream to write to.  | 
| TValue | value | The value to write.  |