Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: -w %{JSON}
From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Sat, 23 May 2020 00:54:43 -0400
Date: Sat, 23 May 2020 00:54:43 -0400
On 5/22/2020 5:09 PM, Daniel Stenberg via curl-users wrote:
>> What is the «JSON object» in terms of «MS PowerShell»?
>
> I don't understand. How does PowerShell change JSON?
>
>> There is a string and an array of strings. There are no «JSON objects».
>
> A JSON object is text formatted correctly to follow the JSON syntax.
In recent versions of Powershell you can use ConvertFrom-Json [1] to
convert curl's json text output to a custom powershell object.
$var = .\curl -w "%{json}" foo | ConvertFrom-Json
$var.GetType()
$var
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-05-23