-Depth Int32 How many levels of contained objects are included in the JSON representation. The default value is 2. Standard Aliases for ConvertTo-Json: none, but if you want to add a short alias like ctjn, set it with set-alias. This cmdlet was introduced in Windows PowerShell 3.0. Examples. Convert a GregorianCalendar Calendar object to a JSON ...
Jul 30, 2020 · Second method, which utilizes PowerShell object to create JSON become handy when the JSON body (parameters) is dynamically changing, that is some values are actually not needed to send with JSON body. The third method utilizes, PowerShell Hash which is based on key and value pairs to create JSON body.