Interface IJsonAdapter<TValue> | Serialization | 1.4.3-preview
docs.unity3d.com
    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
    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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023