akka/akka-http
View on GitHubAbility to use custom MediaTypes with `SprayJsonSupport`
Open
#316 opened on Sep 15, 2016
1 - triagedhackathonhelp wantedt:marshalling
Repository metrics
- Stars
- (1,311 stars)
- PR merge metrics
- (Avg merge 1d 10h) (2 merged PRs in 30d)
Description
The akka-http / Spray json integration is pretty good, but forces one to get generic application/json output. Use of more specific data types (e.g. application/problem+json) is common, and beneficial. However, I did not find a way to implement that with akka-http 2.4.10.
Suggestion: SprayJsonSupport could take an implicit MediaType parameter, defaulting to application/json.
I will make a local copy of the code and experiment with this approach. Decided to first bring this up as an Issue for discussion - can provide a PR if there's acceptance for such a feature.