DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

JSON Serialize — Example 156

Quick explanation + ready code for: JSON Serialize.

PowerShell JSON Serialize Back to examples
Back to language
Syntax: JSON Serialize in PowerShell. ID: #156

Code

@{id=16; ok=$true} | ConvertTo-Json -Compress

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.