JsonExtensions.ToObject<T>(BinaryData, JsonSerializerOptions) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts binary data to an object of the specified type using JSON deserialization.
public static T? ToObject<T>(this BinaryData data, System.Text.Json.JsonSerializerOptions? options = default) where T : class;
static member ToObject : BinaryData * System.Text.Json.JsonSerializerOptions -> 'T (requires 'T : null)
<Extension()>
Public Function ToObject(Of T As Class) (data As BinaryData, Optional options As JsonSerializerOptions = Nothing) As T
Type Parameters
- T
The type to deserialize to.
Parameters
- data
- BinaryData
The binary data to deserialize.
- options
- JsonSerializerOptions
Optional JSON serializer options. If null, uses default options.
Returns
The deserialized object, or null if deserialization fails.