docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SerializedValueView

    A view on top of the PackedBinaryStream that represents any value.

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

    Properties

    this[string]

    Gets the value associated with the specified key.

    Declaration
    public SerializedValueView this[string name] { get; }
    Parameters
    Type Name Description
    string name

    The key of the value to get.

    Property Value
    Type Description
    SerializedValueView
    Exceptions
    Type Condition
    InvalidOperationException

    The view does not represent an object type.

    KeyNotFoundException

    The key does not exist in the collection.

    Type

    The TokenType for this view. Use this to check which conversions are valid.

    Declaration
    public TokenType Type { get; }
    Property Value
    Type Description
    TokenType

    Methods

    AsArrayView()

    Reinterprets the value as an array.

    Declaration
    public SerializedArrayView AsArrayView()
    Returns
    Type Description
    SerializedArrayView

    The value as a SerializedArrayView.

    AsBoolean()

    Reinterprets the value as a bool.

    Declaration
    public bool AsBoolean()
    Returns
    Type Description
    bool

    The value as a bool.

    AsDouble()

    Reinterprets the value as a double.

    Declaration
    public double AsDouble()
    Returns
    Type Description
    double

    The value as a double.

    AsFloat()

    Reinterprets the value as a float.

    Declaration
    public float AsFloat()
    Returns
    Type Description
    float

    The value as a float.

    AsInt32()

    Reinterprets the value as a int.

    Declaration
    public int AsInt32()
    Returns
    Type Description
    int

    The value as an int.

    AsInt64()

    Reinterprets the value as a long.

    Declaration
    public long AsInt64()
    Returns
    Type Description
    long

    The value as a long.

    AsMemberView()

    Reinterprets the value as a member.

    Declaration
    public SerializedMemberView AsMemberView()
    Returns
    Type Description
    SerializedMemberView

    The value as a SerializedMemberView.

    Exceptions
    Type Condition
    InvalidOperationException

    The value could not be reinterpreted.

    AsObjectView()

    Reinterprets the value as an object.

    Declaration
    public SerializedObjectView AsObjectView()
    Returns
    Type Description
    SerializedObjectView

    The value as a SerializedObjectView.

    AsPrimitiveView()

    Reinterprets the value as a primitive.

    Declaration
    public SerializedPrimitiveView AsPrimitiveView()
    Returns
    Type Description
    SerializedPrimitiveView

    The value as a SerializedPrimitiveView.

    AsStringView()

    Reinterprets the value as an string.

    Declaration
    public SerializedStringView AsStringView()
    Returns
    Type Description
    SerializedStringView

    The value as a SerializedStringView.

    Exceptions
    Type Condition
    InvalidOperationException

    The value could not be reinterpreted.

    AsUInt64()

    Reinterprets the value as a ulong.

    Declaration
    public ulong AsUInt64()
    Returns
    Type Description
    ulong

    The value as a ulong.

    IsMember()

    Returns true if the value represents a member.

    Declaration
    public bool IsMember()
    Returns
    Type Description
    bool

    True if the value is a member.

    ToString()

    Returns the debug string for this view.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The debug string for this view.

    Overrides
    ValueType.ToString()
    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)