docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IJsonAdapter<TValue>

    Implement this interface to override serialization and deserialization behaviour for a given type.

    Namespace: Unity.Serialization.Json.Adapters
    Assembly: Unity.Serialization.dll
    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.

    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)