Share via


JsonSerializer.DeserializeObject Method

Definition

Overloads

DeserializeObject(Type, String)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

DeserializeObject(Type, String, DeserializeOptions)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

DeserializeObject(Type, String, DeserializeOptions, Int32)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

DeserializeObject(Type, String, DeserializeOptions, Int32, CompatibilityMode)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

DeserializeObject<T>(String)

Deserializes a JSON structure to its metadata object equivalent.

DeserializeObject<T>(String, DeserializeOptions)

Deserializes a JSON structure to its metadata object equivalent.

DeserializeObject<T>(String, DeserializeOptions, Int32)

Deserializes a JSON structure to its metadata object equivalent.

DeserializeObject<T>(String, DeserializeOptions, Int32, CompatibilityMode)

Deserializes a JSON structure to its metadata object equivalent.

DeserializeObject(Type, String)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

public static Microsoft.AnalysisServices.Tabular.MetadataObject DeserializeObject (Type objectType, string json);
static member DeserializeObject : Type * string -> Microsoft.AnalysisServices.Tabular.MetadataObject
Public Shared Function DeserializeObject (objectType As Type, json As String) As MetadataObject

Parameters

objectType
Type

Type of metadata object to deserialize.

json
String

JSON structure to deserialize.

Returns

v

Applies to

DeserializeObject(Type, String, DeserializeOptions)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

public static Microsoft.AnalysisServices.Tabular.MetadataObject DeserializeObject (Type objectType, string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options);
static member DeserializeObject : Type * string * Microsoft.AnalysisServices.Tabular.DeserializeOptions -> Microsoft.AnalysisServices.Tabular.MetadataObject
Public Shared Function DeserializeObject (objectType As Type, json As String, options As DeserializeOptions) As MetadataObject

Parameters

objectType
Type

Type of metadata object to deserialize.

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

Returns

v

Applies to

DeserializeObject(Type, String, DeserializeOptions, Int32)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

public static Microsoft.AnalysisServices.Tabular.MetadataObject DeserializeObject (Type objectType, string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options, int dbCompatibilityLevel);
static member DeserializeObject : Type * string * Microsoft.AnalysisServices.Tabular.DeserializeOptions * int -> Microsoft.AnalysisServices.Tabular.MetadataObject
Public Shared Function DeserializeObject (objectType As Type, json As String, options As DeserializeOptions, dbCompatibilityLevel As Integer) As MetadataObject

Parameters

objectType
Type

Type of metadata object to deserialize.

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

dbCompatibilityLevel
Int32

Target compatibility level of the database (should be 1200 or greater).

Returns

v

Remarks

If deserialized object holds compatibility restriction greater than dbCompatibilityLevel, an error will be raised.

Applies to

DeserializeObject(Type, String, DeserializeOptions, Int32, CompatibilityMode)

Deserializes a JSON structure of a Tabular database to its metadata object equivalent.

public static Microsoft.AnalysisServices.Tabular.MetadataObject DeserializeObject (Type objectType, string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options, int dbCompatibilityLevel, Microsoft.AnalysisServices.CompatibilityMode mode);
static member DeserializeObject : Type * string * Microsoft.AnalysisServices.Tabular.DeserializeOptions * int * Microsoft.AnalysisServices.CompatibilityMode -> Microsoft.AnalysisServices.Tabular.MetadataObject
Public Shared Function DeserializeObject (objectType As Type, json As String, options As DeserializeOptions, dbCompatibilityLevel As Integer, mode As CompatibilityMode) As MetadataObject

Parameters

objectType
Type

Type of metadata object to deserialize.

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

dbCompatibilityLevel
Int32

Target compatibility level of the database (should be 1200 or greater).

mode
CompatibilityMode

The compatibility mode of the target server.

Returns

v

Remarks

If deserialized object holds compatibility restriction greater than dbCompatibilityLevel, an error will be raised.

Applies to

DeserializeObject<T>(String)

Deserializes a JSON structure to its metadata object equivalent.

public static T DeserializeObject<T> (string json) where T : Microsoft.AnalysisServices.Tabular.MetadataObject;
static member DeserializeObject : string -> 'T (requires 'T :> Microsoft.AnalysisServices.Tabular.MetadataObject)
Public Shared Function DeserializeObject(Of T As MetadataObject) (json As String) As T

Type Parameters

T

Type of metadata object to deserialize.

Parameters

json
String

JSON structure to deserialize.

Returns

T

The in-memory metadata object.

Applies to

DeserializeObject<T>(String, DeserializeOptions)

Deserializes a JSON structure to its metadata object equivalent.

public static T DeserializeObject<T> (string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options) where T : Microsoft.AnalysisServices.Tabular.MetadataObject;
static member DeserializeObject : string * Microsoft.AnalysisServices.Tabular.DeserializeOptions -> 'T (requires 'T :> Microsoft.AnalysisServices.Tabular.MetadataObject)
Public Shared Function DeserializeObject(Of T As MetadataObject) (json As String, options As DeserializeOptions) As T

Type Parameters

T

Type of metadata object to deserialize.

Parameters

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

Returns

T

The in-memory metadata object.

Applies to

DeserializeObject<T>(String, DeserializeOptions, Int32)

Deserializes a JSON structure to its metadata object equivalent.

public static T DeserializeObject<T> (string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options, int dbCompatibilityLevel) where T : Microsoft.AnalysisServices.Tabular.MetadataObject;
static member DeserializeObject : string * Microsoft.AnalysisServices.Tabular.DeserializeOptions * int -> 'T (requires 'T :> Microsoft.AnalysisServices.Tabular.MetadataObject)
Public Shared Function DeserializeObject(Of T As MetadataObject) (json As String, options As DeserializeOptions, dbCompatibilityLevel As Integer) As T

Type Parameters

T

Type of metadata object to deserialize.

Parameters

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

dbCompatibilityLevel
Int32

Target compatibility level of the database (should be 1200 or greater).

Returns

T

The in-memory metadata object.

Applies to

DeserializeObject<T>(String, DeserializeOptions, Int32, CompatibilityMode)

Deserializes a JSON structure to its metadata object equivalent.

public static T DeserializeObject<T> (string json, Microsoft.AnalysisServices.Tabular.DeserializeOptions options, int dbCompatibilityLevel, Microsoft.AnalysisServices.CompatibilityMode mode) where T : Microsoft.AnalysisServices.Tabular.MetadataObject;
static member DeserializeObject : string * Microsoft.AnalysisServices.Tabular.DeserializeOptions * int * Microsoft.AnalysisServices.CompatibilityMode -> 'T (requires 'T :> Microsoft.AnalysisServices.Tabular.MetadataObject)
Public Shared Function DeserializeObject(Of T As MetadataObject) (json As String, options As DeserializeOptions, dbCompatibilityLevel As Integer, mode As CompatibilityMode) As T

Type Parameters

T

Type of metadata object to deserialize.

Parameters

json
String

JSON structure to deserialize.

options
DeserializeOptions

Serialization options.

dbCompatibilityLevel
Int32

Target compatibility level of the database (should be 1200 or greater).

mode
CompatibilityMode

The compatibility mode of the target server.

Returns

T

The in-memory metadata object.

Applies to