JsonSerializer.SerializeObject Method

Definition

Overloads

SerializeObject(MetadataObject)

Serializes an in-memory Tabular model object to a JSON structure.

SerializeObject(MetadataObject, SerializeOptions)

Serializes an in-memory Tabular model object to a JSON structure.

SerializeObject(MetadataObject, SerializeOptions, Int32)

Serializes an in-memory Tabular model object to a JSON structure.

SerializeObject(MetadataObject, SerializeOptions, Int32, CompatibilityMode)

Serializes an in-memory Tabular model object to a JSON structure.

SerializeObject(MetadataObject)

Serializes an in-memory Tabular model object to a JSON structure.

public static string SerializeObject (Microsoft.AnalysisServices.Tabular.MetadataObject metadataObject);
static member SerializeObject : Microsoft.AnalysisServices.Tabular.MetadataObject -> string
Public Shared Function SerializeObject (metadataObject As MetadataObject) As String

Parameters

metadataObject
MetadataObject

The in-memory model object to serialize.

Returns

An object definition in JSON.

Applies to

SerializeObject(MetadataObject, SerializeOptions)

Serializes an in-memory Tabular model object to a JSON structure.

public static string SerializeObject (Microsoft.AnalysisServices.Tabular.MetadataObject metadataObject, Microsoft.AnalysisServices.Tabular.SerializeOptions options);
static member SerializeObject : Microsoft.AnalysisServices.Tabular.MetadataObject * Microsoft.AnalysisServices.Tabular.SerializeOptions -> string
Public Shared Function SerializeObject (metadataObject As MetadataObject, options As SerializeOptions) As String

Parameters

metadataObject
MetadataObject

The in-memory model object to serialize.

options
SerializeOptions

Serialization options.

Returns

An object definition in JSON.

Applies to

SerializeObject(MetadataObject, SerializeOptions, Int32)

Serializes an in-memory Tabular model object to a JSON structure.

public static string SerializeObject (Microsoft.AnalysisServices.Tabular.MetadataObject metadataObject, Microsoft.AnalysisServices.Tabular.SerializeOptions options, int dbCompatibilityLevel);
static member SerializeObject : Microsoft.AnalysisServices.Tabular.MetadataObject * Microsoft.AnalysisServices.Tabular.SerializeOptions * int -> string
Public Shared Function SerializeObject (metadataObject As MetadataObject, options As SerializeOptions, dbCompatibilityLevel As Integer) As String

Parameters

metadataObject
MetadataObject

The in-memory model object to serialize.

options
SerializeOptions

Serialization options.

dbCompatibilityLevel
Int32

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

Returns

An object definition in JSON.

Remarks

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

Applies to

SerializeObject(MetadataObject, SerializeOptions, Int32, CompatibilityMode)

Serializes an in-memory Tabular model object to a JSON structure.

public static string SerializeObject (Microsoft.AnalysisServices.Tabular.MetadataObject metadataObject, Microsoft.AnalysisServices.Tabular.SerializeOptions options, int dbCompatibilityLevel, Microsoft.AnalysisServices.CompatibilityMode mode);
static member SerializeObject : Microsoft.AnalysisServices.Tabular.MetadataObject * Microsoft.AnalysisServices.Tabular.SerializeOptions * int * Microsoft.AnalysisServices.CompatibilityMode -> string
Public Shared Function SerializeObject (metadataObject As MetadataObject, options As SerializeOptions, dbCompatibilityLevel As Integer, mode As CompatibilityMode) As String

Parameters

metadataObject
MetadataObject

The in-memory model object to serialize.

options
SerializeOptions

Serialization options.

dbCompatibilityLevel
Int32

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

mode
CompatibilityMode

The compatibility mode of the target server.

Returns

An object definition in JSON.

Remarks

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

Applies to