docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class JsonDataSerializer

    DataSerializer to serialize to Json and deserialize from Json

    Inheritance
    object
    DataSerializerBase
    JsonDataSerializer
    Implements
    IDataSerializer
    Inherited Members
    DataSerializerBase.isBinarySerializer
    DataSerializerBase.serializerName
    DataSerializerBase.Name()
    DataSerializerBase.IsBinary()
    Namespace: UnityEngine.GameFoundation.DataPersistence
    Assembly: solution.dll
    Syntax
    public sealed class JsonDataSerializer : DataSerializerBase, IDataSerializer

    Constructors

    Name Description
    JsonDataSerializer()

    Default constructor of the Json DataSerialzier

    Methods

    Name Description
    Deserialize(string, Type, bool)

    Json deserialzation method that deserialize the data from a string as the type T and return it as an object. Can use encryption.

    Deserialize<T>(byte[], bool)

    This method is not implemented yet. Json deserialization method that deserialize the data from a byte array and return it as the type T. Can use encryption.

    Deserialize<T>(Stream, bool)

    Json deserialization method that deserialize the data from a stream and return it as the type T. Can use encryption.

    Deserialize<T>(string, bool)

    Json deserialization method that deserialize the data from a string and return it as the type T. Can use encryption.

    Serialize(object)

    Json serialization method that serialize a data object and return the data as object.

    Serialize(object, bool)

    Json serialization method that serialize a data object and return the data as string. Can use encryption.

    Serialize<T>(T, bool)

    Json serialization method that serialize the data of a generic type T and return the data as string. Can use encryption.

    Serialize<T>(T, Stream, bool)

    Json serialization method that serialize the data of a generic type T and write the data through a stream. Can use encryption.

    In This Article
    Back to top
    Copyright © 2024 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)