https://docs.serde.rs/serde_json/fn.to_writer_pretty.html … is probably what you’re after.
Ahh just saw your follow up tweet.
4:33 AM - 16 Nov 2018
0 replies
0 retweets
1 like
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.