Reputation: 213
Is it possible to get the servicestack.text to produce formatted/indented json?
I was wanting it to write the json to a text file. it would be nice if it was already formatted nicely.
Upvotes: 8
Views: 1076
Reputation: 11116
Update from 2017, from this answer:
The new
string.IndentJson()
extension method available from v4.5.5 will let you pretty-print JSON otherwise you can install a Pretty JSONView extension for Chrome or Firefox to see pretty JSON or you can paste the JSON in jsonprettyprint.com
Upvotes: 1
Reputation: 1479
Checkout the .Dump() extension method. Should be what you're looking for.
Upvotes: 1