Finally found that library(http/json) has what I need. The width option controls the thing. I propose that the portray_clause/1 should pretty print json terms using this json_write/3
No. portray_clause/1 is defined to print the term such that it is valid syntax and reads back to the original. You do get acceptable results if you use the βdictβ variation of the JSON API.