Interface IJsonMigration<TValue> | Serialization | 1.4.3-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IJsonMigration<TValue>

    Interface used to describe how a specified type should be migrated from one version to another.

    Namespace: Unity.Serialization.Json.Adapters
    Syntax
    public interface IJsonMigration<TValue> : IJsonMigration
    Type Parameters
    Name Description
    TValue

    The type this interface defines migration for.

    Properties

    Version

    The current serialized version for the type.

    Declaration
    int Version { get; }
    Property Value
    Type Description
    Int32

    Methods

    Migrate(JsonMigrationContext)

    Implement this method to manage migration for TValue.

    Declaration
    TValue Migrate(JsonMigrationContext context)
    Parameters
    Type Name Description
    JsonMigrationContext context

    A context object used to unpack and transfer the data.

    Returns
    Type Description
    TValue

    The deserialized and migrated value.

    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