How can I pretty print a JSON/dictionary value?

If performance is not a problem you can pprint it in the server.

The interpreter in the server is a real Python interpreter and will behave as expected. Create the callable function in the server, call_s it from the client and show the result.