语言

JSONException 构造函数

定义

重载

名称 说明
JSONException(Throwable)

创建具有指定原因的 JSON 异常。 详细信息消息是原因的字符串表示形式,或者 null 没有原因。

JSONException(String)

创建 JSON 异常,并 s 作为其详细信息消息。

JSONException(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

JSONException(String, Throwable)

创建包含指定详细信息消息和原因的 JSON 异常。

JSONException(Throwable)

创建具有指定原因的 JSON 异常。 详细信息消息是原因的字符串表示形式,或者 null 没有原因。

[Android.Runtime.Register(".ctor", "(Ljava/lang/Throwable;)V", "", ApiSince=27)]
public JSONException(Java.Lang.Throwable? cause);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Throwable;)V", "", ApiSince=27)>]
new Org.Json.JSONException : Java.Lang.Throwable -> Org.Json.JSONException

参数

cause
Throwable

导致此异常的异常,或者 null 原因未知。

特性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

JSONException(String)

创建 JSON 异常,并 s 作为其详细信息消息。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")]
public JSONException(string? s);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;)V", "")>]
new Org.Json.JSONException : string -> Org.Json.JSONException

参数

s
String

异常的详细信息消息,或者 null 没有详细信息消息。

特性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

JSONException(IntPtr, JniHandleOwnership)

创建 JNI 对象的托管表示形式时使用的构造函数;由运行时调用。

protected JSONException(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Org.Json.JSONException : nativeint * Android.Runtime.JniHandleOwnership -> Org.Json.JSONException

参数

javaReference
IntPtr

nativeint

IntPtr一个包含Java本机接口 (JNI) 对象引用。

transfer
JniHandleOwnership

指示 JniHandleOwnership如何处理 javaReference

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于

JSONException(String, Throwable)

创建包含指定详细信息消息和原因的 JSON 异常。

[Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "", ApiSince=27)]
public JSONException(string? message, Java.Lang.Throwable? cause);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/String;Ljava/lang/Throwable;)V", "", ApiSince=27)>]
new Org.Json.JSONException : string * Java.Lang.Throwable -> Org.Json.JSONException

参数

message
String

异常的详细信息消息,或者 null 没有详细信息消息。

cause
Throwable

导致此异常的异常,或者 null 原因未知。

特性

注解

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于