You can get JSON output from the CLI with the appropriate flags. For instance, many commands support appending flags for JSON output.
You might use:
prefect work-pool inspect <name> --output=json
or
prefect work-pool inspect <name> -o json
For example, if you want to inspect a work pool and get the details in JSON format, you can run:
prefect work-pool inspect my-pool --output=json
Here's the GitHub issue where this feature request is discussed:
https://github.com/PrefectHQ/prefect/issues/13188.