Have not tested against simple outputs, but most cmdlets emit objects and primitives generally play decently nice with ConvertTo-Json, so I wouldn't call it a big concern.
May want to do the same for the exception handling that is down 2 lines as well.
Don't forget that ConvertTo-Json depth wreaks havoc sometimes, so we will want to test carefully if we do use ConvertTo-Json as the solution. Maybe set depth to a specific value.
Describe the Change
When objects get passed to Pode.Web, they can look pretty bad coming to the textbox.
Even changing the line to something like this with a json conversion is a lot better:
Current output:![image](https://github.com/Badgerati/Pode.Web/assets/6242511/d1dea559-b5de-4caf-9752-4b0d4b7a1c11)
An improved output:![image](https://github.com/Badgerati/Pode.Web/assets/6242511/bc7a014e-26d1-4f0c-8a17-ec8491ea5a19)
Have not tested against simple outputs, but most cmdlets emit objects and primitives generally play decently nice with ConvertTo-Json, so I wouldn't call it a big concern.
May want to do the same for the exception handling that is down 2 lines as well.