2 ms·
I did something similar a few years ago with the HTML5 JSON Report Format: https://github.com/ServiceStack/ServiceStack/wiki/HTML5ReportFormat https://github.co
by mythz 13y ago
I did something similar a few years ago with the HTML5 JSON Report Format: https://github.com/ServiceStack/ServiceStack/wiki/HTML5ReportFormat https://github.com/ServiceStack/ServiceStack/wiki/HTML5Repor...
It's been baked into http://www.servicestack.net http://www.servicestack.net web service fx and lets you see a human readable view of every web service response when called from a browser (i.e. Accept:text/html).
It's also has dynamically sortable table rows and is also completely static/stand-alone. It's just a static template that wraps an embedded JSON response and converting it to HTML on the fly and injecting it the page (all client-side / use view-source).
Here's a live preview of it in action:
http://servicestack.net/ServiceStack.Northwind/customers/ALFKI http://servicestack.net/ServiceStack.Northwind/customers/ALF...
And the JSON service it's wrapping:
http://servicestack.net/ServiceStack.Northwind/customers/ALFKI?format=json http://servicestack.net/ServiceStack.Northwind/customers/ALF...