docs.unity3d.com
    Show / Hide Table of Contents

    Class InvalidJsonException

    The exception that is thrown when json input is invalid.

    Inheritance
    Object
    Exception
    InvalidJsonException
    Inherited Members
    Exception.GetBaseException()
    Exception.ToString()
    Exception.GetType()
    Exception.Message
    Exception.Data
    Exception.InnerException
    Exception.TargetSite
    Exception.StackTrace
    Exception.HelpLink
    Exception.Source
    Exception.HResult
    Exception.SerializeObjectState
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.MemberwiseClone()
    Namespace: Unity.Serialization.Json
    Syntax
    [Serializable]
    public class InvalidJsonException : Exception, ISerializable, _Exception

    Constructors

    InvalidJsonException(SerializationInfo, StreamingContext)

    Initializes a new instance of the InvalidJsonException class with serialized data.

    Declaration
    protected InvalidJsonException(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    The SerializationInfo that holds the serialized object data about the exception being thrown.

    StreamingContext context

    The StreamingContext that contains contextual information about the source or destination.

    InvalidJsonException(String)

    Initialized a new instance of the InvalidJsonException class with a specified error message.

    Declaration
    public InvalidJsonException(string message)
    Parameters
    Type Name Description
    String message

    The message that describes the error.

    InvalidJsonException(String, Exception)

    Initializes a new instance of the InvalidJsonException class with a specified error message and a reference to the inner exception that is the cause of this exception.

    Declaration
    public InvalidJsonException(string message, Exception inner)
    Parameters
    Type Name Description
    String message

    The message that describes the error.

    Exception inner

    The inner exception reference.

    Properties

    Character

    The character the validator stopped at.

    Declaration
    public int Character { get; set; }
    Property Value
    Type Description
    Int32

    Line

    The line the validator stopped at.

    Declaration
    public int Line { get; set; }
    Property Value
    Type Description
    Int32

    Methods

    GetObjectData(SerializationInfo, StreamingContext)

    Sets the SerializationInfo with information about the exception.

    Declaration
    [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)]
    public override void GetObjectData(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    SerializationInfo info

    The SerializationInfo that holds the serialized object data about the exception being thrown.

    StreamingContext context

    The StreamingContext that contains contextual information about the source or destination.

    Overrides
    Exception.GetObjectData(SerializationInfo, StreamingContext)
    Exceptions
    Type Condition
    ArgumentNullException

    The info parameter is a null reference

    In This Article
    • Constructors
      • InvalidJsonException(SerializationInfo, StreamingContext)
      • InvalidJsonException(String)
      • InvalidJsonException(String, Exception)
    • Properties
      • Character
      • Line
    • Methods
      • GetObjectData(SerializationInfo, StreamingContext)
    Back to top
    Terms of use
    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