JsonSerializer.Deserialize Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Aşırı Yüklemeler
| Deserialize(Stream, JsonTypeInfo) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini |
| Deserialize(Utf8JsonReader, Type, JsonSerializerContext) |
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) |
| Deserialize(JsonNode, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden JsonNode |
| Deserialize(JsonNode, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonNode |
| Deserialize(JsonElement, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden JsonElement |
| Deserialize(JsonElement, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonElement |
| Deserialize(JsonDocument, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden JsonDocument |
| Deserialize(JsonDocument, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonDocument |
| Deserialize(String, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden metni bir |
| Deserialize(String, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden metni belirtilen türdeki bir örneğe ayrıştırıyor. |
| Deserialize(ReadOnlySpan<Char>, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden metni bir |
| Deserialize(ReadOnlySpan<Char>, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden metni belirtilen türdeki bir örneğe ayrıştırıyor. |
| Deserialize(Utf8JsonReader, Type, JsonSerializerOptions) |
Sağlanan okuyucudan bir JSON değeri (nesneler veya diziler dahil) okur ve bunu belirtilen türde bir örneğe dönüştürür. |
| Deserialize(ReadOnlySpan<Byte>, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini belirtilen türdeki bir örneğe ayrıştırıyor. |
| Deserialize(Stream, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden UTF-8 kodlu metni |
| Deserialize(Stream, Type, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden UTF-8 kodlu metni |
| Deserialize(Utf8JsonReader, JsonTypeInfo) |
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) |
| Deserialize(JsonNode, JsonTypeInfo) |
Tek bir JSON değerini temsil eden JsonNode |
| Deserialize(JsonElement, JsonTypeInfo) |
Tek bir JSON değerini temsil eden JsonElement |
| Deserialize(JsonDocument, JsonTypeInfo) |
Tek bir JSON değerini temsil eden JsonDocument |
| Deserialize(String, JsonTypeInfo) |
Tek bir JSON değerini temsil eden metni, |
| Deserialize(ReadOnlySpan<Char>, JsonTypeInfo) |
Tek bir JSON değerini temsil eden metni, |
| Deserialize(ReadOnlySpan<Byte>, Type, JsonSerializerContext) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini bir |
| Deserialize(ReadOnlySpan<Byte>, JsonTypeInfo) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini |
| Deserialize<TValue>(JsonElement, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonElement |
| Deserialize<TValue>(JsonElement, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden JsonElement |
| Deserialize<TValue>(Utf8JsonReader, JsonTypeInfo<TValue>) |
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) |
| Deserialize<TValue>(JsonNode, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden JsonNode |
| Deserialize<TValue>(Utf8JsonReader, JsonSerializerOptions) |
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) genel tür parametresi tarafından belirtilen tür örneğine okur. |
| Deserialize<TValue>(JsonDocument, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden JsonDocument |
| Deserialize<TValue>(JsonNode, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonNode |
| Deserialize<TValue>(JsonDocument, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden JsonDocument |
| Deserialize<TValue>(ReadOnlySpan<Char>, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden metni bir |
| Deserialize<TValue>(String, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden metni, genel tür parametresi tarafından belirtilen türün bir örneğine ayrıştırılır. |
| Deserialize<TValue>(ReadOnlySpan<Char>, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden metni, genel tür parametresi tarafından belirtilen türün bir örneğine ayrıştırılır. |
| Deserialize<TValue>(ReadOnlySpan<Byte>, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini bir |
| Deserialize<TValue>(ReadOnlySpan<Byte>, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini, genel tür parametresi tarafından belirtilen tür örneğine ayrıştırılır. |
| Deserialize<TValue>(Stream, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden UTF-8 kodlu metni |
| Deserialize<TValue>(Stream, JsonSerializerOptions) |
Tek bir JSON değerini temsil eden UTF-8 kodlu metni |
| Deserialize<TValue>(String, JsonTypeInfo<TValue>) |
Tek bir JSON değerini temsil eden metni bir |
Deserialize(Stream, JsonTypeInfo)
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini jsonTypeInfotarafından belirtilen bir örnekte okur.
Akış tamamlanmaya okunur.
public:
static System::Object ^ Deserialize(System::IO::Stream ^ utf8Json, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(System.IO.Stream utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : System.IO.Stream * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
Public Function Deserialize (utf8Json As Stream, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- utf8Json
- Stream
Ayrıştırmak için JSON verileri.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
utf8Json veya jsonTypeInfonull.
JSON geçersiz veya Stream'de kalan veriler var.
Şunlara uygulanır
Deserialize(Utf8JsonReader, Type, JsonSerializerContext)
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) returnTypeokur.
public:
static System::Object ^ Deserialize(System::Text::Json::Utf8JsonReader % reader, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(ref System.Text.Json.Utf8JsonReader reader, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : Utf8JsonReader * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
Public Function Deserialize (ByRef reader As Utf8JsonReader, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- reader
- Utf8JsonReader
Okunacak okuyucu.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType veya contextnull.
JSON geçersiz, returnType JSON ile uyumlu değil veya okuyucudan bir değer okunamadı.
reader desteklenmeyen seçenekleri kullanıyor.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan context üzerindeki GetTypeInfo(Type) yöntemi returnTypeiçin uyumlu bir JsonTypeInfo döndürmedi.
Açıklamalar
reader
TokenType özelliği PropertyName veya Noneise, değerin başlangıcını belirlemek için Read() bir çağrıyla okuyucu gelişmiş olur.
Bu yöntem tamamlandıktan sonra reader JSON değerindeki son belirteçte konumlandırılır. Bir özel durum oluşturulursa, okuyucu yöntemi çağrıldığında içinde olduğu duruma sıfırlanır.
Bu yöntem okuyucunun üzerinde işlem yaptığı verilerin bir kopyasını oluşturur, bu nedenle bu yöntemin döndürülmesinin ötesinde veri bütünlüğünü korumak için çağıran gereksinimi yoktur.
Utf8JsonReader örneğini oluşturmak için kullanılan JsonReaderOptions, çakıştığında JsonSerializerOptions önceliklidir. Bu nedenle okuma sırasında AllowTrailingCommas, MaxDepthve CommentHandling kullanılır.
Şunlara uygulanır
Deserialize(JsonNode, Type, JsonSerializerContext)
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
Tek bir JSON değerini temsil eden JsonNodereturnTypedönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::Nodes::JsonNode ^ node, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(this System.Text.Json.Nodes.JsonNode? node, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : System.Text.Json.Nodes.JsonNode * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
<Extension()>
Public Function Deserialize (node As JsonNode, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan contextGetTypeInfo(Type) yöntemi, türün dönüştürülmesi için null döndürür.
Şunlara uygulanır
Deserialize(JsonNode, Type, JsonSerializerOptions)
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
Tek bir JSON değerini temsil eden JsonNodereturnTypedönüştürür.
public static object? Deserialize(this System.Text.Json.Nodes.JsonNode? node, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.Nodes.JsonNode * Type * System.Text.Json.JsonSerializerOptions -> obj
<Extension()>
Public Function Deserialize (node As JsonNode, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType JSON ile uyumlu değildir.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize(JsonElement, Type, JsonSerializerContext)
Tek bir JSON değerini temsil eden JsonElementreturnTypedönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::JsonElement element, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(this System.Text.Json.JsonElement element, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : System.Text.Json.JsonElement * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
<Extension()>
Public Function Deserialize (element As JsonElement, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- element
- JsonElement
Dönüştürülecek JsonElement.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan contextGetTypeInfo(Type) yöntemi, türün dönüştürülmesi için null döndürür.
Şunlara uygulanır
Deserialize(JsonElement, Type, JsonSerializerOptions)
Tek bir JSON değerini temsil eden JsonElementreturnTypedönüştürür.
public static object? Deserialize(this System.Text.Json.JsonElement element, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.JsonElement * Type * System.Text.Json.JsonSerializerOptions -> obj
<Extension()>
Public Function Deserialize (element As JsonElement, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- element
- JsonElement
Dönüştürülecek JsonElement.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType
null.
returnType JSON ile uyumlu değildir.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize(JsonDocument, Type, JsonSerializerContext)
Tek bir JSON değerini temsil eden JsonDocumentreturnTypedönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::JsonDocument ^ document, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(this System.Text.Json.JsonDocument document, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : System.Text.Json.JsonDocument * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
<Extension()>
Public Function Deserialize (document As JsonDocument, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- document
- JsonDocument
Dönüştürülecek JsonDocument.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan contextGetTypeInfo(Type) yöntemi, türün dönüştürülmesi için null döndürür.
Şunlara uygulanır
Deserialize(JsonDocument, Type, JsonSerializerOptions)
Tek bir JSON değerini temsil eden JsonDocumentreturnTypedönüştürür.
public static object? Deserialize(this System.Text.Json.JsonDocument document, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.JsonDocument * Type * System.Text.Json.JsonSerializerOptions -> obj
<Extension()>
Public Function Deserialize (document As JsonDocument, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- document
- JsonDocument
Dönüştürülecek JsonDocument.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
document veya returnTypenull.
returnType JSON ile uyumlu değildir.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize(String, Type, JsonSerializerContext)
Tek bir JSON değerini temsil eden metni bir returnTypeolarak ayrıştırıyor.
public:
static System::Object ^ Deserialize(System::String ^ json, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(string json, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : string * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
Public Function Deserialize (json As String, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- json
- String
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan contextGetTypeInfo(Type) yöntemi, türün dönüştürülmesi için null döndürür.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize(String, Type, JsonSerializerOptions)
Tek bir JSON değerini temsil eden metni belirtilen türdeki bir örneğe ayrıştırıyor.
public static object? Deserialize(string json, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
public static object Deserialize(string json, Type returnType, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : string * Type * System.Text.Json.JsonSerializerOptions -> obj
Public Function Deserialize (json As String, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Public Shared Function Deserialize (json As String, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- json
- String
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
json veya returnTypenull.
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize(ReadOnlySpan<Char>, Type, JsonSerializerContext)
Tek bir JSON değerini temsil eden metni bir returnTypeolarak ayrıştırıyor.
public:
static System::Object ^ Deserialize(ReadOnlySpan<char> json, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(ReadOnlySpan<char> json, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : ReadOnlySpan<char> * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
Public Function Deserialize (json As ReadOnlySpan(Of Char), returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- json
- ReadOnlySpan<Char>
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan contextGetTypeInfo(Type) yöntemi, türün dönüştürülmesi için null döndürür.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize(ReadOnlySpan<Char>, Type, JsonSerializerOptions)
Tek bir JSON değerini temsil eden metni belirtilen türdeki bir örneğe ayrıştırıyor.
public static object? Deserialize(ReadOnlySpan<char> json, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : ReadOnlySpan<char> * Type * System.Text.Json.JsonSerializerOptions -> obj
Public Function Deserialize (json As ReadOnlySpan(Of Char), returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- json
- ReadOnlySpan<Char>
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType
null.
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Yayılma alanında tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından UTF-16 span kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize(Utf8JsonReader, Type, JsonSerializerOptions)
Sağlanan okuyucudan bir JSON değeri (nesneler veya diziler dahil) okur ve bunu belirtilen türde bir örneğe dönüştürür.
public static object? Deserialize(ref System.Text.Json.Utf8JsonReader reader, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
public static object Deserialize(ref System.Text.Json.Utf8JsonReader reader, Type returnType, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : Utf8JsonReader * Type * System.Text.Json.JsonSerializerOptions -> obj
Public Function Deserialize (ByRef reader As Utf8JsonReader, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Public Shared Function Deserialize (ByRef reader As Utf8JsonReader, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- reader
- Utf8JsonReader
JSON dosyasının okunduğu okuyucu.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Okuma sırasında seri hale getirme davranışını denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType
null.
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Okuyucudan bir değer okunamadı.
reader desteklenmeyen seçenekleri kullanıyor.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
reader
TokenType özelliği JsonTokenType.PropertyName veya JsonTokenType.Noneise, değerin başlangıcını belirlemek için Utf8JsonReader.Read() bir çağrıyla okuyucu gelişmiş olur.
Bu yöntem tamamlandıktan sonra reader JSON değerindeki son belirteçte konumlandırılır. Bir özel durum oluşturulursa, okuyucu yöntemi çağrıldığında içinde olduğu duruma sıfırlanır.
Bu yöntem okuyucunun üzerinde işlem yaptığı verilerin bir kopyasını oluşturur, bu nedenle bu yöntemin döndürülmesinin ötesinde veri bütünlüğünü korumak için çağıran gereksinimi yoktur.
Utf8JsonReader örneğini oluşturmak için kullanılan JsonReaderOptions, çakıştığında JsonSerializerOptions önceliklidir. Bu nedenle okuma sırasında JsonReaderOptions.AllowTrailingCommas, JsonReaderOptions.MaxDepthve JsonReaderOptions.CommentHandling kullanılır.
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize(ReadOnlySpan<Byte>, Type, JsonSerializerOptions)
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini belirtilen türdeki bir örneğe ayrıştırıyor.
public static object? Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
public static object Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : ReadOnlySpan<byte> * Type * System.Text.Json.JsonSerializerOptions -> obj
Public Function Deserialize (utf8Json As ReadOnlySpan(Of Byte), returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Public Shared Function Deserialize (utf8Json As ReadOnlySpan(Of Byte), returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- utf8Json
- ReadOnlySpan<Byte>
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType
null.
JSON geçersiz.
-veya-
returnType JSON ile uyumlu değildir.
-veya-
Yayılma alanında tek bir JSON değerinin ötesinde kalan veriler vardır.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize(Stream, Type, JsonSerializerContext)
Tek bir JSON değerini temsil eden UTF-8 kodlu metni returnTypeolarak okur.
Akış tamamlanmaya okunur.
public:
static System::Object ^ Deserialize(System::IO::Stream ^ utf8Json, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(System.IO.Stream utf8Json, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : System.IO.Stream * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
Public Function Deserialize (utf8Json As Stream, returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- utf8Json
- Stream
Ayrıştırmak için JSON verileri.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
utf8Json, returnTypeveya contextnull.
JSON geçersiz, returnType JSON ile uyumlu değil veya Stream'de kalan veriler var.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan context üzerindeki GetTypeInfo(Type) yöntemi returnTypeiçin uyumlu bir JsonTypeInfo döndürmedi.
Şunlara uygulanır
Deserialize(Stream, Type, JsonSerializerOptions)
Tek bir JSON değerini temsil eden UTF-8 kodlu metni returnTypeolarak okur.
Akış tamamlanmaya okunur.
public static object? Deserialize(System.IO.Stream utf8Json, Type returnType, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.IO.Stream * Type * System.Text.Json.JsonSerializerOptions -> obj
Public Function Deserialize (utf8Json As Stream, returnType As Type, Optional options As JsonSerializerOptions = Nothing) As Object
Parametreler
- utf8Json
- Stream
Ayrıştırmak için JSON verileri.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- options
- JsonSerializerOptions
Okuma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
utf8Json veya returnTypenull.
JSON geçersiz, returnType JSON ile uyumlu değil veya Stream'de kalan veriler var.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize(Utf8JsonReader, JsonTypeInfo)
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) jsonTypeInfotarafından belirtilen bir örneğe okur.
public:
static System::Object ^ Deserialize(System::Text::Json::Utf8JsonReader % reader, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : Utf8JsonReader * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
Public Function Deserialize (ByRef reader As Utf8JsonReader, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- reader
- Utf8JsonReader
Okunacak okuyucu.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
JSON geçersiz, jsonTypeInfo JSON ile uyumlu değil veya okuyucudan bir değer okunamadı.
reader desteklenmeyen seçenekleri kullanıyor.
Açıklamalar
reader
TokenType özelliği PropertyName veya Noneise, değerin başlangıcını belirlemek için Read() bir çağrıyla okuyucu gelişmiş olur.
Bu yöntem tamamlandıktan sonra reader JSON değerindeki son belirteçte konumlandırılır. Bir özel durum oluşturulursa, okuyucu yöntemi çağrıldığında içinde olduğu duruma sıfırlanır.
Bu yöntem okuyucunun üzerinde işlem yaptığı verilerin bir kopyasını oluşturur, bu nedenle bu yöntemin döndürülmesinin ötesinde veri bütünlüğünü korumak için çağıran gereksinimi yoktur.
Utf8JsonReader örneğini oluşturmak için kullanılan JsonReaderOptions, çakıştığında JsonSerializerOptions önceliklidir. Bu nedenle okuma sırasında AllowTrailingCommas, MaxDepthve CommentHandling kullanılır.
Şunlara uygulanır
Deserialize(JsonNode, JsonTypeInfo)
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
Tek bir JSON değerini temsil eden JsonNodejsonTypeInfotarafından belirtilen bir örneğe dönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::Nodes::JsonNode ^ node, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(this System.Text.Json.Nodes.JsonNode? node, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : System.Text.Json.Nodes.JsonNode * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
<Extension()>
Public Function Deserialize (node As JsonNode, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
jsonTypeInfo
null.
Şunlara uygulanır
Deserialize(JsonElement, JsonTypeInfo)
Tek bir JSON değerini temsil eden JsonElementjsonTypeInfotarafından belirtilen bir örneğe dönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::JsonElement element, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(this System.Text.Json.JsonElement element, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : System.Text.Json.JsonElement * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
<Extension()>
Public Function Deserialize (element As JsonElement, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- element
- JsonElement
Dönüştürülecek JsonElement.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
jsonTypeInfo
null.
Şunlara uygulanır
Deserialize(JsonDocument, JsonTypeInfo)
Tek bir JSON değerini temsil eden JsonDocumentjsonTypeInfotarafından belirtilen bir örneğe dönüştürür.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ Deserialize(System::Text::Json::JsonDocument ^ document, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(this System.Text.Json.JsonDocument document, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : System.Text.Json.JsonDocument * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
<Extension()>
Public Function Deserialize (document As JsonDocument, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- document
- JsonDocument
Dönüştürülecek JsonDocument.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
Şunlara uygulanır
Deserialize(String, JsonTypeInfo)
Tek bir JSON değerini temsil eden metni, jsonTypeInfotarafından belirtilen bir örneğe ayrıştırılır.
public:
static System::Object ^ Deserialize(System::String ^ json, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(string json, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : string * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
Public Function Deserialize (json As String, jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- json
- String
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize(ReadOnlySpan<Char>, JsonTypeInfo)
Tek bir JSON değerini temsil eden metni, jsonTypeInfotarafından belirtilen bir örneğe ayrıştırılır.
public:
static System::Object ^ Deserialize(ReadOnlySpan<char> json, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(ReadOnlySpan<char> json, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : ReadOnlySpan<char> * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
Public Function Deserialize (json As ReadOnlySpan(Of Char), jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- json
- ReadOnlySpan<Char>
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
jsonTypeInfo
null.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize(ReadOnlySpan<Byte>, Type, JsonSerializerContext)
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini bir returnTypeolarak ayrıştırıyor.
public:
static System::Object ^ Deserialize(ReadOnlySpan<System::Byte> utf8Json, Type ^ returnType, System::Text::Json::Serialization::JsonSerializerContext ^ context);
public static object? Deserialize(ReadOnlySpan<byte> utf8Json, Type returnType, System.Text.Json.Serialization.JsonSerializerContext context);
static member Deserialize : ReadOnlySpan<byte> * Type * System.Text.Json.Serialization.JsonSerializerContext -> obj
Public Function Deserialize (utf8Json As ReadOnlySpan(Of Byte), returnType As Type, context As JsonSerializerContext) As Object
Parametreler
- utf8Json
- ReadOnlySpan<Byte>
Ayrıştırmak için JSON metni.
- returnType
- Type
Dönüştürülecek ve döndürülecek nesnenin türü.
- context
- JsonSerializerContext
Serileştirilebilir türler için meta veri sağlayıcısı.
Döndürülenler
JSON değerinin returnType gösterimi.
Özel durumlar
returnType
null.
JSON geçersiz, returnType JSON ile uyumlu değil veya Stream'de kalan veriler var.
returnType veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Sağlanan context üzerindeki GetTypeInfo(Type) yöntemi returnTypeiçin uyumlu bir JsonTypeInfo döndürmedi.
Şunlara uygulanır
Deserialize(ReadOnlySpan<Byte>, JsonTypeInfo)
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini jsonTypeInfotarafından belirtilen bir örneğe ayrıştırıyor.
public:
static System::Object ^ Deserialize(ReadOnlySpan<System::Byte> utf8Json, System::Text::Json::Serialization::Metadata::JsonTypeInfo ^ jsonTypeInfo);
public static object? Deserialize(ReadOnlySpan<byte> utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo jsonTypeInfo);
static member Deserialize : ReadOnlySpan<byte> * System.Text.Json.Serialization.Metadata.JsonTypeInfo -> obj
Public Function Deserialize (utf8Json As ReadOnlySpan(Of Byte), jsonTypeInfo As JsonTypeInfo) As Object
Parametreler
- utf8Json
- ReadOnlySpan<Byte>
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin jsonTypeInfo gösterimi.
Özel durumlar
JSON geçersiz veya arabellekte kalan veriler var.
Şunlara uygulanır
Deserialize<TValue>(JsonElement, JsonSerializerOptions)
Tek bir JSON değerini temsil eden JsonElementTValuedönüştürür.
public static TValue? Deserialize<TValue>(this System.Text.Json.JsonElement element, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.JsonElement * System.Text.Json.JsonSerializerOptions -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (element As JsonElement, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- element
- JsonElement
Dönüştürülecek JsonElement.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(JsonElement, JsonTypeInfo<TValue>)
Tek bir JSON değerini temsil eden JsonElementTValuedönüştürür.
public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
static TValue Deserialize(System::Text::Json::JsonElement element, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(this System.Text.Json.JsonElement element, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : System.Text.Json.JsonElement * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (element As JsonElement, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- element
- JsonElement
Dönüştürülecek JsonElement.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
jsonTypeInfo
null.
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(Utf8JsonReader, JsonTypeInfo<TValue>)
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) TValueokur.
public:
generic <typename TValue>
static TValue Deserialize(System::Text::Json::Utf8JsonReader % reader, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : Utf8JsonReader * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
Public Function Deserialize(Of TValue) (ByRef reader As Utf8JsonReader, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- reader
- Utf8JsonReader
Okunacak okuyucu.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz, TValue JSON ile uyumlu değil veya okuyucudan bir değer okunamadı.
reader desteklenmeyen seçenekleri kullanıyor.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
reader
TokenType özelliği PropertyName veya Noneise, değerin başlangıcını belirlemek için Read() bir çağrıyla okuyucu gelişmiş olur.
Bu yöntem tamamlandıktan sonra reader JSON değerindeki son belirteçte konumlandırılır. Bir özel durum oluşturulursa, okuyucu yöntemi çağrıldığında içinde olduğu duruma sıfırlanır.
Bu yöntem okuyucunun üzerinde işlem yaptığı verilerin bir kopyasını oluşturur, bu nedenle bu yöntemin döndürülmesinin ötesinde veri bütünlüğünü korumak için çağıran gereksinimi yoktur.
Utf8JsonReader örneğini oluşturmak için kullanılan JsonReaderOptions, çakıştığında JsonSerializerOptions önceliklidir. Bu nedenle okuma sırasında AllowTrailingCommas, MaxDepthve CommentHandling kullanılır.
Şunlara uygulanır
Deserialize<TValue>(JsonNode, JsonTypeInfo<TValue>)
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
Tek bir JSON değerini temsil eden JsonNodeTValuedönüştürür.
public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
static TValue Deserialize(System::Text::Json::Nodes::JsonNode ^ node, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(this System.Text.Json.Nodes.JsonNode? node, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : System.Text.Json.Nodes.JsonNode * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (node As JsonNode, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
jsonTypeInfo
null.
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(Utf8JsonReader, JsonSerializerOptions)
Sağlanan okuyucudan bir JSON değerini (nesneler veya diziler dahil) genel tür parametresi tarafından belirtilen tür örneğine okur.
public static TValue? Deserialize<TValue>(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions? options = default);
public static TValue Deserialize<TValue>(ref System.Text.Json.Utf8JsonReader reader, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : Utf8JsonReader * System.Text.Json.JsonSerializerOptions -> 'Value
Public Function Deserialize(Of TValue) (ByRef reader As Utf8JsonReader, Optional options As JsonSerializerOptions = Nothing) As TValue
Public Shared Function Deserialize(Of TValue) (ByRef reader As Utf8JsonReader, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin hedef türü.
Parametreler
- reader
- Utf8JsonReader
JSON dosyasının okunduğu okuyucu.
- options
- JsonSerializerOptions
Okuma sırasında seri hale getirici davranışını denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Okuyucudan bir değer okunamadı.
reader desteklenmeyen seçenekleri kullanır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
reader
TokenType özelliği JsonTokenType.PropertyName veya JsonTokenType.Noneise, değerin başlangıcını belirlemek için Utf8JsonReader.Read() bir çağrıyla okuyucu gelişmiş olur.
Bu yöntem tamamlandıktan sonra reader JSON değerindeki son belirteçte konumlandırılır. Bir özel durum oluşturulursa, okuyucu yöntemi çağrıldığında içinde olduğu duruma sıfırlanır.
Bu yöntem okuyucunun üzerinde işlem yaptığı verilerin bir kopyasını oluşturur, bu nedenle bu yöntemin döndürülmesinin ötesinde veri bütünlüğünü korumak için çağıran gereksinimi yoktur.
Utf8JsonReader örneğini oluşturmak için kullanılan JsonReaderOptions, çakıştığında JsonSerializerOptions önceliklidir. Bu nedenle okuma sırasında JsonReaderOptions.AllowTrailingCommas, JsonReaderOptions.MaxDepthve JsonReaderOptions.CommentHandling kullanılır.
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize<TValue>(JsonDocument, JsonTypeInfo<TValue>)
Tek bir JSON değerini temsil eden JsonDocumentTValuedönüştürür.
public:
generic <typename TValue>
[System::Runtime::CompilerServices::Extension]
static TValue Deserialize(System::Text::Json::JsonDocument ^ document, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(this System.Text.Json.JsonDocument document, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : System.Text.Json.JsonDocument * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (document As JsonDocument, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- document
- JsonDocument
Dönüştürülecek JsonDocument.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(JsonNode, JsonSerializerOptions)
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
- Kaynak:
- JsonSerializer.Read.Node.cs
Tek bir JSON değerini temsil eden JsonNodeTValuedönüştürür.
public static TValue? Deserialize<TValue>(this System.Text.Json.Nodes.JsonNode? node, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.Nodes.JsonNode * System.Text.Json.JsonSerializerOptions -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (node As JsonNode, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(JsonDocument, JsonSerializerOptions)
Tek bir JSON değerini temsil eden JsonDocumentTValuedönüştürür.
public static TValue? Deserialize<TValue>(this System.Text.Json.JsonDocument document, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.Text.Json.JsonDocument * System.Text.Json.JsonSerializerOptions -> 'Value
<Extension()>
Public Function Deserialize(Of TValue) (document As JsonDocument, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- document
- JsonDocument
Dönüştürülecek JsonDocument.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
document
null.
TValue JSON ile uyumlu değildir.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(ReadOnlySpan<Char>, JsonTypeInfo<TValue>)
Tek bir JSON değerini temsil eden metni bir TValueolarak ayrıştırıyor.
public:
generic <typename TValue>
static TValue Deserialize(ReadOnlySpan<char> json, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(ReadOnlySpan<char> json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : ReadOnlySpan<char> * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
Public Function Deserialize(Of TValue) (json As ReadOnlySpan(Of Char), jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- json
- ReadOnlySpan<Char>
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize<TValue>(String, JsonSerializerOptions)
Tek bir JSON değerini temsil eden metni, genel tür parametresi tarafından belirtilen türün bir örneğine ayrıştırılır.
public static TValue? Deserialize<TValue>(string json, System.Text.Json.JsonSerializerOptions? options = default);
public static TValue Deserialize<TValue>(string json, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : string * System.Text.Json.JsonSerializerOptions -> 'Value
Public Function Deserialize(Of TValue) (json As String, Optional options As JsonSerializerOptions = Nothing) As TValue
Public Shared Function Deserialize(Of TValue) (json As String, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin hedef türü.
Parametreler
- json
- String
Ayrıştırmak için JSON metni.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
json
null.
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize<TValue>(ReadOnlySpan<Char>, JsonSerializerOptions)
Tek bir JSON değerini temsil eden metni, genel tür parametresi tarafından belirtilen türün bir örneğine ayrıştırılır.
public static TValue? Deserialize<TValue>(ReadOnlySpan<char> json, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : ReadOnlySpan<char> * System.Text.Json.JsonSerializerOptions -> 'Value
Public Function Deserialize(Of TValue) (json As ReadOnlySpan(Of Char), Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- json
- ReadOnlySpan<Char>
Ayrıştırmak için JSON metni.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Yayılma alanında tek bir JSON değerinin ötesinde kalan veriler vardır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından UTF-16 span kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.
Şunlara uygulanır
Deserialize<TValue>(ReadOnlySpan<Byte>, JsonTypeInfo<TValue>)
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini bir TValueolarak ayrıştırıyor.
public:
generic <typename TValue>
static TValue Deserialize(ReadOnlySpan<System::Byte> utf8Json, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : ReadOnlySpan<byte> * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
Public Function Deserialize(Of TValue) (utf8Json As ReadOnlySpan(Of Byte), jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- utf8Json
- ReadOnlySpan<Byte>
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz, TValue JSON ile uyumlu değil veya Stream'de kalan veriler var.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(ReadOnlySpan<Byte>, JsonSerializerOptions)
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
- Kaynak:
- JsonSerializer.Read.Span.cs
Tek bir JSON değerini temsil eden UTF-8 kodlanmış metnini, genel tür parametresi tarafından belirtilen tür örneğine ayrıştırılır.
public static TValue? Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, System.Text.Json.JsonSerializerOptions? options = default);
public static TValue Deserialize<TValue>(ReadOnlySpan<byte> utf8Json, System.Text.Json.JsonSerializerOptions options = default);
static member Deserialize : ReadOnlySpan<byte> * System.Text.Json.JsonSerializerOptions -> 'Value
Public Function Deserialize(Of TValue) (utf8Json As ReadOnlySpan(Of Byte), Optional options As JsonSerializerOptions = Nothing) As TValue
Public Shared Function Deserialize(Of TValue) (utf8Json As ReadOnlySpan(Of Byte), Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
UTF-8 ile kodlanmış metnin hedef türü.
Parametreler
- utf8Json
- ReadOnlySpan<Byte>
Ayrıştırmak için JSON metni.
- options
- JsonSerializerOptions
Ayrıştırma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Yayılma alanında tek bir JSON değerinin ötesinde kalan veriler vardır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Daha fazla bilgi için bkz. JSONseri hale getirme ve seri durumdan çıkarma
Şunlara uygulanır
Deserialize<TValue>(Stream, JsonTypeInfo<TValue>)
Tek bir JSON değerini temsil eden UTF-8 kodlu metni TValueolarak okur.
Akış tamamlanmaya okunur.
public:
generic <typename TValue>
static TValue Deserialize(System::IO::Stream ^ utf8Json, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(System.IO.Stream utf8Json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : System.IO.Stream * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
Public Function Deserialize(Of TValue) (utf8Json As Stream, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- utf8Json
- Stream
Ayrıştırmak için JSON verileri.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
utf8Json veya jsonTypeInfonull.
JSON geçersiz, TValue JSON ile uyumlu değil veya Stream'de kalan veriler var.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(Stream, JsonSerializerOptions)
Tek bir JSON değerini temsil eden UTF-8 kodlu metni TValueolarak okur.
Akış tamamlanmaya okunur.
public static TValue? Deserialize<TValue>(System.IO.Stream utf8Json, System.Text.Json.JsonSerializerOptions? options = default);
static member Deserialize : System.IO.Stream * System.Text.Json.JsonSerializerOptions -> 'Value
Public Function Deserialize(Of TValue) (utf8Json As Stream, Optional options As JsonSerializerOptions = Nothing) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- utf8Json
- Stream
Ayrıştırmak için JSON verileri.
- options
- JsonSerializerOptions
Okuma sırasında davranışı denetleme seçenekleri.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
utf8Json
null.
JSON geçersiz, TValue JSON ile uyumlu değil veya Stream'de kalan veriler var.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Şunlara uygulanır
Deserialize<TValue>(String, JsonTypeInfo<TValue>)
Tek bir JSON değerini temsil eden metni bir TValueolarak ayrıştırıyor.
public:
generic <typename TValue>
static TValue Deserialize(System::String ^ json, System::Text::Json::Serialization::Metadata::JsonTypeInfo<TValue> ^ jsonTypeInfo);
public static TValue? Deserialize<TValue>(string json, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo);
static member Deserialize : string * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> -> 'Value
Public Function Deserialize(Of TValue) (json As String, jsonTypeInfo As JsonTypeInfo(Of TValue)) As TValue
Tür Parametreleri
- TValue
JSON değerinin serisini kaldıracak tür.
Parametreler
- json
- String
Ayrıştırmak için JSON metni.
- jsonTypeInfo
- JsonTypeInfo<TValue>
Dönüştürülecek tür hakkındaki meta veriler.
Döndürülenler
JSON değerinin TValue gösterimi.
Özel durumlar
JSON geçersiz.
-veya-
TValue JSON ile uyumlu değildir.
-veya-
Dizede tek bir JSON değerinin ötesinde kalan veriler vardır.
TValue veya serileştirilebilir üyeleri için uyumlu JsonConverter yoktur.
Açıklamalar
Uygulama yerel olarak UTF-8 kullandığından, String kullanmak UTF-8 yöntemlerini kullanmak kadar verimli değildir.