Struct DeserializationResult | Serialization | 1.2.0-preview
docs.unity.cn
    Show / Hide Table of Contents

    Struct DeserializationResult

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

    Namespace: Unity.Serialization.Json
    Syntax
    public 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
    Boolean

    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.

    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX