Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use clojure.pprint for text/plain? #263

Open
vspinu opened this issue Jun 23, 2016 · 1 comment
Open

Use clojure.pprint for text/plain? #263

vspinu opened this issue Jun 23, 2016 · 1 comment

Comments

@vspinu
Copy link

vspinu commented Jun 23, 2016

Sorry for being a pest these days, but wouldn't it be nicer if text/plain were rendered by default with pprint? Something like this:

(defmethod render-map-generic "text/plain"
  [data ctx]
  (with-out-str (clojure.pprint/pprint data)))

instead of the current implementation

@ordnungswidrig
Copy link
Member

ordnungswidrig commented Jun 24, 2016

Maybe yes, maybe no. Plain text conversion for an arbitrary data structure was never thought out too much. It was more or less implemented in a way that a human readable plain text document is generated. It falls short in a lot of ways, especially for deep nested data structures. The idea was to have a good default to render data to get you started. It's expected that custom render functions will be used according to the needs of the individual project.

I don't want to put much effort into this, TBH, and keep backward compatibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants