spray/spray — pull request #322 by theon (2013-06-18 11:24:26+00:00)
Title: Default to UTF8 charset for application/json request entities

[This post](https://groups.google.com/forum/?fromgroups#!topic/spray-user/3Z-KEIFpzXI) on the mailing list describes a change that was made to spray to default to using a `utf8` charset for response entities that have a media type of `application/json`

This commit makes the same change, but for request entities.

Using `1.1-M8`, if I send a `POST` like so":

POST /api

Content-Type: application/json

{ "test": "汉字/漢字" }

The chinese characters get mangled as spray defaults to a charset of `ISO-8859-1`. Changing the POST to:

POST /api

Content-Type: application/json; charset=utf8

{ "test": "汉字/漢字" }

Fixes the problem, but it makes sense for spray to default to `utf8` for requests like the first example, as RFC4627 restricts json to be UTF encoded.