Exports a portion of a JSON document, recursively importing references.
Export-Json.ps1 [[-JsonPointer] <String>] [-InputObject <Object>] [-Compress]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
Export-Json.ps1 [[-JsonPointer] <String>] -Path <String> [-Compress] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
'{d:{a:{b:1,c:{"$ref":"#/d/two"}},two:2}}' |Export-Json.ps1 /d/a
{ “b”: 1, “c”: 2 }
'{d:{a:{b:1,c:{"$ref":"#/d/c"}},c:{d:{"$ref":"#/d/two"}},two:2}}' |Export-Json.ps1 /d/a
{ “b”: 1, “c”: { “d”: 2 } }
The full path name of the property to get, as a JSON Pointer, modified to support wildcards: ~0 = ~ ~1 = / ~2 = ? ~3 = * ~4 = [
Type: String
Parameter Sets: (All)
Aliases: Name
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
The JSON (string or parsed object/hashtable) to get the value from.
Type: Object
Parameter Sets: InputObject
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
A JSON file to update.
Type: String
Parameter Sets: Path
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Omits white space and indented formatting in the output string.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.