These are chat archives for hseeberger/akka-http-json

Jul 2016
Jens Grassel
Jul 21 2016 14:30

@hseeberger Hi, we are using the circe project with akka http and have discovered a problem with unmarshalling json entities that are "too large" (Actually they are quite small around 20 KB).

If we use entity(as[Foo]) everything is fine until the JSON we send reaches a certain size (currently around 20/21 KB). After reaching this size we only get "400 Bad Request" back with an error from the circe parser like "The request content was malformed: Attempt to decode value on failed cursor: ..."

However if we switch the content type from application/json to text/plain and use entity(as[ByteString]) and decode manually afterwards via decode[Foo](body.utf8String) everything works. Could this be related to streaming issues (incomplete json available in the unmarshaller)?

Heiko Seeberger
Jul 21 2016 15:34
@jan0sch, interesting observation. I don't know the reason. Would you mind creating a minimized reproducer and create an issue? It would be interesting to see how other JSON libraries behave under the same circumstancesk, too.
Jens Grassel
Jul 21 2016 18:18
@hseeberger I'm on my way into holidays. But I'll get back to it after that. Time to climb some mountains. :smile: