Partager via


PSSerializer.Serialize Method

Definition

Overloads

Serialize(Object)

Serializes an object into PowerShell CliXml.

Serialize(Object, Int32)

Serializes an object into PowerShell CliXml.

Serialize(Object)

Serializes an object into PowerShell CliXml.

public:
 static System::String ^ Serialize(System::Object ^ source);
public:
 static Platform::String ^ Serialize(Platform::Object ^ source);
 static std::wstring Serialize(winrt::Windows::Foundation::IInspectable const & source);
public static string Serialize (object source);
static member Serialize : obj -> string
Public Shared Function Serialize (source As Object) As String

Parameters

source
Object

The input object to serialize. Serializes to a default depth of 1.

Returns

The serialized object, as CliXml.

Applies to

Serialize(Object, Int32)

Serializes an object into PowerShell CliXml.

public:
 static System::String ^ Serialize(System::Object ^ source, int depth);
public:
 static Platform::String ^ Serialize(Platform::Object ^ source, int depth);
 static std::wstring Serialize(winrt::Windows::Foundation::IInspectable const & source, int depth);
public static string Serialize (object source, int depth);
static member Serialize : obj * int -> string
Public Shared Function Serialize (source As Object, depth As Integer) As String

Parameters

source
Object

The input object to serialize.

depth
Int32

The depth of the members to serialize.

Returns

The serialized object, as CliXml.

Applies to