Skip to content

Commit 22f3a90

Browse files
committed
Rebase and minor edits
1 parent 60c672e commit 22f3a90

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

reference/7.6/Microsoft.PowerShell.Utility/ConvertTo-Json.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 05/16/2024
5+
ms.date: 12/04/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertto-json?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: ConvertTo-Json
@@ -11,25 +11,29 @@ title: ConvertTo-Json
1111
# ConvertTo-Json
1212

1313
## SYNOPSIS
14+
1415
Converts an object to a JSON-formatted string.
1516

1617
## SYNTAX
1718

1819
### Default (Default)
20+
1921
```
2022
ConvertTo-Json [-InputObject] <Object> [-Depth <Int32>] [-Compress]
2123
[-EnumsAsStrings] [-EscapeHandling <StringEscapeHandling>]
2224
[<CommonParameters>]
2325
```
2426

2527
### Array
28+
2629
```
2730
ConvertTo-Json [-InputObject] <Object> -AsArray [-Depth <Int32>] [-Compress]
2831
[-EnumsAsStrings] [-EscapeHandling <StringEscapeHandling>]
2932
[<CommonParameters>]
3033
```
3134

3235
### Stream
36+
3337
```
3438
ConvertTo-Json [-InputObject] <Object> -AsStream [-Depth <Int32>] [-Compress]
3539
[-EnumsAsStrings] [-EscapeHandling <StringEscapeHandling>]
@@ -53,8 +57,8 @@ object, which is easily managed in PowerShell.
5357
Many web sites use JSON instead of XML to serialize data for communication between servers and
5458
web-based apps.
5559

56-
As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds
57-
the depth specified for the command. This prevents unwanted data loss when converting objects.
60+
As of PowerShell 7.1, `ConvertTo-Json` emits a warning if the depth of the input object exceeds the
61+
depth specified for the command. This prevents unwanted data loss when converting objects.
5862

5963
As of PowerShell 7.5-preview.3, `ConvertTo-Json` can serialize **BigInteger** values as raw JSON
6064
numbers.
@@ -207,7 +211,8 @@ Accept wildcard characters: False
207211
208212
### -AsStream
209213
210-
Converts each input object to a complete JSON string.
214+
Converts each input object to a separate, complete JSON object string, rather than combining all
215+
input objects into a single JSON array.
211216
212217
```yaml
213218
Type: System.Management.Automation.SwitchParameter
@@ -223,7 +228,7 @@ Accept wildcard characters: False
223228
224229
### -Compress
225230
226-
Omits white space and indented formatting in the output string.
231+
Omits whitespace and indented formatting in the output string.
227232
228233
```yaml
229234
Type: System.Management.Automation.SwitchParameter

0 commit comments

Comments
 (0)