言語

JsonException コンストラクター

定義

オーバーロード

名前 説明
JsonException()

JsonException クラスの新しいインスタンスを初期化します。

JsonException(String)

指定したエラー メッセージを使用して、 JsonException クラスの新しいインスタンスを初期化します。

JsonException(SerializationInfo, StreamingContext)
古い.

シリアル化されたデータを含む新しい例外オブジェクトを作成します。

JsonException(String, Exception)

指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、 JsonException クラスの新しいインスタンスを初期化します。

JsonException(String, String, Nullable<Int64>, Nullable<Int64>)

エラー情報をユーザーに中継する新しい例外オブジェクトを作成します。

JsonException(String, String, Nullable<Int64>, Nullable<Int64>, Exception)

指定した内部例外を含むエラー情報をユーザーに中継する新しい例外オブジェクトを作成します。

JsonException()

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

JsonException クラスの新しいインスタンスを初期化します。

public:
 JsonException();
public JsonException();
Public Sub New ()

適用対象

JsonException(String)

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

指定したエラー メッセージを使用して、 JsonException クラスの新しいインスタンスを初期化します。

public:
 JsonException(System::String ^ message);
public JsonException(string? message);
public JsonException(string message);
new System.Text.Json.JsonException : string -> System.Text.Json.JsonException
Public Sub New (message As String)

パラメーター

message
String

コンテキスト固有のエラー メッセージ。

適用対象

JsonException(SerializationInfo, StreamingContext)

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

注意事項

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

シリアル化されたデータを含む新しい例外オブジェクトを作成します。

protected:
 JsonException(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
protected JsonException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
new System.Text.Json.JsonException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Text.Json.JsonException
new System.Text.Json.JsonException : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> System.Text.Json.JsonException
Protected Sub New (info As SerializationInfo, context As StreamingContext)

パラメーター

info
SerializationInfo

スローされる例外に関するシリアル化されたオブジェクト データ。

context
StreamingContext

ソースまたは変換先に関するコンテキスト情報を含むオブジェクト。

属性

例外

infonullです。

適用対象

JsonException(String, Exception)

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

指定したエラー メッセージと、この例外の原因である内部例外への参照を使用して、 JsonException クラスの新しいインスタンスを初期化します。

public:
 JsonException(System::String ^ message, Exception ^ innerException);
public JsonException(string? message, Exception? innerException);
public JsonException(string message, Exception innerException);
new System.Text.Json.JsonException : string * Exception -> System.Text.Json.JsonException
Public Sub New (message As String, innerException As Exception)

パラメーター

message
String

コンテキスト固有のエラー メッセージ。

innerException
Exception

現在の例外の原因となった例外。

適用対象

JsonException(String, String, Nullable<Int64>, Nullable<Int64>)

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

エラー情報をユーザーに中継する新しい例外オブジェクトを作成します。

public:
 JsonException(System::String ^ message, System::String ^ path, Nullable<long> lineNumber, Nullable<long> bytePositionInLine);
public JsonException(string? message, string? path, long? lineNumber, long? bytePositionInLine);
public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine);
new System.Text.Json.JsonException : string * string * Nullable<int64> * Nullable<int64> -> System.Text.Json.JsonException
Public Sub New (message As String, path As String, lineNumber As Nullable(Of Long), bytePositionInLine As Nullable(Of Long))

パラメーター

message
String

コンテキスト固有のエラー メッセージ。

path
String

無効な JSON が検出されたパス。

lineNumber
Nullable<Int64>

逆シリアル化時に無効な JSON が検出された行番号 (0 から始まる)。

bytePositionInLine
Nullable<Int64>

無効な JSON が検出された現在の行 (0 から始まる) 内のバイト数。

注釈

bytePositionInLineでは、文字やスカラーではなく、バイト数 (つまり、UTF-8 コード単位) がカウントされることに注意してください。

適用対象

JsonException(String, String, Nullable<Int64>, Nullable<Int64>, Exception)

ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs
ソース:
JsonException.cs

指定した内部例外を含むエラー情報をユーザーに中継する新しい例外オブジェクトを作成します。

public:
 JsonException(System::String ^ message, System::String ^ path, Nullable<long> lineNumber, Nullable<long> bytePositionInLine, Exception ^ innerException);
public JsonException(string? message, string? path, long? lineNumber, long? bytePositionInLine, Exception? innerException);
public JsonException(string message, string path, long? lineNumber, long? bytePositionInLine, Exception innerException);
new System.Text.Json.JsonException : string * string * Nullable<int64> * Nullable<int64> * Exception -> System.Text.Json.JsonException
Public Sub New (message As String, path As String, lineNumber As Nullable(Of Long), bytePositionInLine As Nullable(Of Long), innerException As Exception)

パラメーター

message
String

コンテキスト固有のエラー メッセージ。

path
String

無効な JSON が検出されたパス。

lineNumber
Nullable<Int64>

逆シリアル化時に無効な JSON が検出された行番号 (0 から始まる)。

bytePositionInLine
Nullable<Int64>

無効な JSON が検出された現在の行内のバイト数 (0 から始まる)。

innerException
Exception

現在の例外の原因となった例外。

注釈

bytePositionInLineでは、文字やスカラーではなく、バイト数 (つまり UTF-8 コード単位) がカウントされることに注意してください。

適用対象