|
| 1 | +--- |
| 2 | +external help file: Plaster-help.xml |
| 3 | +Module Name: Plaster |
| 4 | +online version: https://github.com/PowerShellOrg/Plaster/blob/master/docs/en-US/ConvertTo-JsonManifest.md |
| 5 | +schema: 2.0.0 |
| 6 | +--- |
| 7 | + |
| 8 | +# ConvertTo-JsonManifest |
| 9 | + |
| 10 | +## SYNOPSIS |
| 11 | +Converts a Plaster XML manifest to JSON format. |
| 12 | + |
| 13 | +## SYNTAX |
| 14 | + |
| 15 | +``` |
| 16 | +ConvertTo-JsonManifest [-XmlManifest] <XmlDocument> [-Compress] [-ProgressAction <ActionPreference>] |
| 17 | + [<CommonParameters>] |
| 18 | +``` |
| 19 | + |
| 20 | +## DESCRIPTION |
| 21 | +Converts an XML-format Plaster manifest (plasterManifest.xml) to the JSON format |
| 22 | +(plasterManifest.json) used by Plaster 2.0. Accepts an XmlDocument from |
| 23 | +Test-PlasterManifest via the pipeline or the -XmlManifest parameter and returns |
| 24 | +the resulting JSON as a string. |
| 25 | + |
| 26 | +## EXAMPLES |
| 27 | + |
| 28 | +### Example 1 |
| 29 | +```powershell |
| 30 | +$xml = Test-PlasterManifest -Path .\plasterManifest.xml |
| 31 | +ConvertTo-JsonManifest -XmlManifest $xml | Set-Content .\plasterManifest.json |
| 32 | +``` |
| 33 | + |
| 34 | +Converts plasterManifest.xml and writes the result to plasterManifest.json. |
| 35 | + |
| 36 | +### Example 2 |
| 37 | +```powershell |
| 38 | +Test-PlasterManifest -Path .\plasterManifest.xml | ConvertTo-JsonManifest | Set-Content .\plasterManifest.json |
| 39 | +``` |
| 40 | + |
| 41 | +Pipes the validated manifest directly into ConvertTo-JsonManifest. |
| 42 | + |
| 43 | +## PARAMETERS |
| 44 | + |
| 45 | +### -Compress |
| 46 | +Omits white space and indented formatting in the output JSON string. |
| 47 | + |
| 48 | +```yaml |
| 49 | +Type: SwitchParameter |
| 50 | +Parameter Sets: (All) |
| 51 | +Aliases: |
| 52 | + |
| 53 | +Required: False |
| 54 | +Position: Named |
| 55 | +Default value: None |
| 56 | +Accept pipeline input: False |
| 57 | +Accept wildcard characters: False |
| 58 | +``` |
| 59 | +
|
| 60 | +### -XmlManifest |
| 61 | +The parsed XML manifest to convert. Use Test-PlasterManifest to load and validate |
| 62 | +a plasterManifest.xml file before passing it to this function. |
| 63 | +
|
| 64 | +```yaml |
| 65 | +Type: XmlDocument |
| 66 | +Parameter Sets: (All) |
| 67 | +Aliases: |
| 68 | + |
| 69 | +Required: True |
| 70 | +Position: 0 |
| 71 | +Default value: None |
| 72 | +Accept pipeline input: True (ByValue) |
| 73 | +Accept wildcard characters: False |
| 74 | +``` |
| 75 | +
|
| 76 | +### -ProgressAction |
| 77 | +{{ Fill ProgressAction Description }} |
| 78 | +
|
| 79 | +```yaml |
| 80 | +Type: ActionPreference |
| 81 | +Parameter Sets: (All) |
| 82 | +Aliases: proga |
| 83 | + |
| 84 | +Required: False |
| 85 | +Position: Named |
| 86 | +Default value: None |
| 87 | +Accept pipeline input: False |
| 88 | +Accept wildcard characters: False |
| 89 | +``` |
| 90 | +
|
| 91 | +### CommonParameters |
| 92 | +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). |
| 93 | +
|
| 94 | +## INPUTS |
| 95 | +
|
| 96 | +### System.Xml.XmlDocument |
| 97 | +The validated XML manifest returned by Test-PlasterManifest. |
| 98 | +
|
| 99 | +## OUTPUTS |
| 100 | +
|
| 101 | +### System.String |
| 102 | +A JSON string representation of the Plaster manifest. |
| 103 | +
|
| 104 | +## NOTES |
| 105 | +
|
| 106 | +## RELATED LINKS |
| 107 | +
|
| 108 | +[Test-PlasterManifest](https://github.com/PowerShellOrg/Plaster/blob/master/docs/en-US/Test-PlasterManifest.md) |
0 commit comments