docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct DeserializationResult

    Object containing the results of a deserialization. Use this to capture any errors or events.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Serialization.Json
    Assembly: Unity.Serialization.dll
    Syntax
    public readonly struct DeserializationResult

    Properties

    Errors

    Returns any events with Error that occured during deserialization.

    Declaration
    public IEnumerable<DeserializationEvent> Errors { get; }
    Property Value
    Type Description
    IEnumerable<DeserializationEvent>

    Events

    Returns all DeserializationEvent that occured during deserialization.

    Declaration
    public IEnumerable<DeserializationEvent> Events { get; }
    Property Value
    Type Description
    IEnumerable<DeserializationEvent>

    Exceptions

    Returns any events with Exception that occured during deserialization.

    Declaration
    public IEnumerable<DeserializationEvent> Exceptions { get; }
    Property Value
    Type Description
    IEnumerable<DeserializationEvent>

    Logs

    Returns any events with Log that occured during deserialization.

    Declaration
    public IEnumerable<DeserializationEvent> Logs { get; }
    Property Value
    Type Description
    IEnumerable<DeserializationEvent>

    Warnings

    Returns any events with Warning that occured during deserialization.

    Declaration
    public IEnumerable<DeserializationEvent> Warnings { get; }
    Property Value
    Type Description
    IEnumerable<DeserializationEvent>

    Methods

    DidSucceed()

    Gets the status of the deserialization.

    Declaration
    public bool DidSucceed()
    Returns
    Type Description
    bool

    true if deserialization succeeded; otherwise, false.

    Throw()

    Rethrows any errors encountered during deserialization.

    Declaration
    public void Throw()
    Remarks

    If a single exception was encountered the exception is re-thrown. If multiple exceptions were encountered a AggregateException is thrown.

    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)