How can I pretty print a JSON/dictionary value?

@hasib - the indent argument was easy enought to implement so that should go live soon.

If you want a temporary solution you can use json.dumps on the server until the client version goes live.

Or use the javascript version from window

from anvil.js.window import JSON
JSON.stringify(obj, None, 2)
2 Likes