JsonObject.ConvertFromJson 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.
Overloads
ConvertFromJson(String, ErrorRecord) |
Convert a Json string back to an object of type PSObject. |
ConvertFromJson(String, Boolean, ErrorRecord) |
Convert a Json string back to an object of type PSObject or
Hashtable depending on parameter |
ConvertFromJson(String, Boolean, Nullable<Int32>, ErrorRecord) |
Convert a JSON string back to an object of type PSObject or
Hashtable depending on parameter |
ConvertFromJson(String, ErrorRecord)
Convert a Json string back to an object of type PSObject.
public:
static System::Object ^ ConvertFromJson(System::String ^ input, [Runtime::InteropServices::Out] System::Management::Automation::ErrorRecord ^ % error);
public static object ConvertFromJson (string input, out System.Management.Automation.ErrorRecord error);
static member ConvertFromJson : string * ErrorRecord -> obj
Public Shared Function ConvertFromJson (input As String, ByRef error As ErrorRecord) As Object
Parameters
- input
- String
The json text to convert.
- error
- ErrorRecord
An error record if the conversion failed.
Returns
A PSObject.
Applies to
ConvertFromJson(String, Boolean, ErrorRecord)
public static object ConvertFromJson (string input, bool returnHashtable, out System.Management.Automation.ErrorRecord error);
static member ConvertFromJson : string * bool * ErrorRecord -> obj
Public Shared Function ConvertFromJson (input As String, returnHashtable As Boolean, ByRef error As ErrorRecord) As Object
Parameters
- input
- String
The json text to convert.
- error
- ErrorRecord
An error record if the conversion failed.
Returns
A PSObject or a Hashtable
if the returnHashtable
parameter is true.
Applies to
ConvertFromJson(String, Boolean, Nullable<Int32>, ErrorRecord)
public static object ConvertFromJson (string input, bool returnHashtable, int? maxDepth, out System.Management.Automation.ErrorRecord error);
static member ConvertFromJson : string * bool * Nullable<int> * ErrorRecord -> obj
Public Shared Function ConvertFromJson (input As String, returnHashtable As Boolean, maxDepth As Nullable(Of Integer), ByRef error As ErrorRecord) As Object
Parameters
- input
- String
The JSON text to convert.
The max depth allowed when deserializing the json input. Set to null for no maximum.
- error
- ErrorRecord
An error record if the conversion failed.
Returns
A PSObject or a Hashtable
if the returnHashtable
parameter is true.