docs.unity3d.com
    Show / Hide Table of Contents

    Class JsonObject

    JsonObject class for encapsulating generic object types. We use this to hide internal Json implementation details.

    Inheritance
    Object
    JsonObject
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Cloud.Assets
    Syntax
    public class JsonObject : IDeserializable

    Methods

    GetAs<T>()

    Overload for returning the object as a defined type but without needing to specify DeserializationSettings.

    Declaration
    public T GetAs<T>()
    Returns
    Type Description
    T

    The internal object case to type T.

    Type Parameters
    Name Description
    T

    The type to cast internal object to.

    GetAs<T>(MissingMemberHandling)

    Returns the object as a defined type. Previously this function restricted use of object or dynamic types but validation for these has been removed. As such, be careful when passing or exposing objects of these types.

    Declaration
    public T GetAs<T>(MissingMemberHandling missingMemberHandling = null)
    Parameters
    Type Name Description
    MissingMemberHandling missingMemberHandling

    How to handle missing members when deserializing.

    Returns
    Type Description
    T

    The internal object cast to type T.

    Type Parameters
    Name Description
    T

    The type to cast internal object to.

    Implements
    IDeserializable.GetAs<T>(MissingMemberHandling)

    GetAsString()

    Returns the internal object as a string.

    Declaration
    public string GetAsString()
    Returns
    Type Description
    String

    The internal object as a string.

    Implements
    IDeserializable.GetAsString()
    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