4 ms·
It looks like: `curl <url> | jq .tag_name` Note: curl & jq are independent programs (as long as `curl` produce json text with tag_name in each, the command work
by d0mine 5y ago
It looks like: `curl <url> | jq .tag_name` Note: curl & jq are independent programs (as long as `curl` produce json text with tag_name in each, the command works, no matter other changes).
If ConvertFrom-Json & Select-Object were not builtin, how much information about each other would they need to cooperate? Can an unrelated change in ConvertFrom-Json's output break corresponding Select-Object command? How much are they intertangled?
- bobalob_wtf 5y agoConvertFrom-Json converts json text into a PowerShell object with properties derived from the json. Select-Object (in this instance) selects a property from the object. An unrelated change in ConvertFrom-Json wouldn't change it's basic nature which is to convert json into something you can manipulate with other PowerShell cmdlets.
- vips7L 5y agoCurl to python is actually what happens in the Linux install script [0]. To your point, all cmdlets adhere to an interface so they always return and receive typed data. They don’t really need to know anything except that they’re receiving or giving powershell objects. Non built in commands (native binaries) just pipe a stream of bytes just like any posix shell.