JsonConverter<T>.Read 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
讀取並轉換 JSON 為 T類型。
public:
abstract T Read(System::Text::Json::Utf8JsonReader % reader, Type ^ typeToConvert, System::Text::Json::JsonSerializerOptions ^ options);
public abstract T? Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
public abstract T Read(ref System.Text.Json.Utf8JsonReader reader, Type typeToConvert, System.Text.Json.JsonSerializerOptions options);
abstract member Read : Utf8JsonReader * Type * System.Text.Json.JsonSerializerOptions -> 'T
Public MustOverride Function Read (ByRef reader As Utf8JsonReader, typeToConvert As Type, options As JsonSerializerOptions) As T
參數
- reader
- Utf8JsonReader
讀者。
- typeToConvert
- Type
那種要轉化的人。
- options
- JsonSerializerOptions
一個指定序列化選項的物件。
傳回
T
換算後的價值。
備註
欲了解更多資訊,請參閱 如何撰寫 JSON 序列化的自訂轉換器。