Hi, I'm pretty new to spray-json, so maybe I'm asking an already solved problem! Somehow I ran into an utf-8 encoding problem with spray-json unmarshalling, maybe someone could tell me what the problem is. I just cloned akka-http-rest template with Typesafe activator, then I changed UsersServiceRoute like this:
pathEndOrSingleSlash {
get {
complete(getUsers().map(_.toJson))
} ~
post {
entity(as[UserEntity]) { userEntity =>
complete(createUser(userEntity))
}
}
}
so now I may create new users from POST request, and everything works fine with ASC-II encoding requests. Then I tried one request with UTF-8 characters in it, the unmarshalling behaves wierdly, just like the following:
Hi, I'm pretty new to spray-json, so maybe I'm asking an already solved problem! Somehow I ran into an utf-8 encoding problem with spray-json unmarshalling, maybe someone could tell me what the problem is. I just cloned akka-http-rest template with Typesafe activator, then I changed UsersServiceRoute like this:
so now I may create new users from POST request, and everything works fine with ASC-II encoding requests. Then I tried one request with UTF-8 characters in it, the unmarshalling behaves wierdly, just like the following:
request:
response
As you can see, all the utf-8 characters are correct, except the first one, I'm totally confused, what should I do?