Merge pull request #18836 from spray/wip-revert-spray-json-utf8-workaround

=htp #18389 revert earlier workaround since original problem in spray-json has been fixed
This commit is contained in:
Konrad Malawski 2015-11-03 14:32:53 +01:00
commit 2b8763dd7b

View file

@ -23,7 +23,7 @@ trait SprayJsonSupport {
implicit def sprayJsValueUnmarshaller: FromEntityUnmarshaller[JsValue] =
Unmarshaller.byteStringUnmarshaller.forContentTypes(`application/json`).mapWithCharset { (data, charset)
val input =
if (charset == HttpCharsets.`UTF-8`) ParserInput(data.utf8String)
if (charset == HttpCharsets.`UTF-8`) ParserInput(data.toArray)
else ParserInput(data.decodeString(charset.nioCharset.name)) // FIXME: identify charset by instance, not by name!
JsonParser(input)
}