hseeberger / akka-http-json

Integrate some of the best JSON libs in Scala with Akka HTTP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restore ability to provide Play JSON printer

sarahgerweck opened this issue · comments

4e2ba10 removed the ability to provide a custom JsValue => String function into the Play JSON marshaller and hard-coded it to be pretty printed. In my primary application for this, a marshaller that forcibly injects large amounts of excess whitespace into every request and response is not suitable.

This change wasn't made to others like the json4s marshaller, which still accepts a parameter to choose whether or not you want pretty printing.

I can make a pull request reverting this particular part of that change if that would be helpful? If you're not interested in restoring this, please let me know so I can go ahead with writing my own marshaller.

(Incidentally, I always thought it was a strange choice to default to using pretty-printed formatting. This is not what I'd expect from a library meant for real applications.)

Please create a PR, that would be much appreciated.

Closed by #136.

Thanks for merging. 😄