Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-04-26 Thread Henrik Nordvik
On Wednesday, March 29, 2017 at 7:13:28 AM UTC-4, Konrad Malawski wrote: > In principle sure, though not on anyones roadmap nowadays. > You could contribute such a thing or find a json parser whihc has such > failure mode - I'm unaware of any parser which has such failure mode though. >

Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-04-26 Thread Konrad Malawski
That Jackson support is for JavaDSL though - do not mix the DSLs. It is absolutely possible and supported to use Jackson in ScalaDSL though: It's implemented by Heiko's library here: https://github.com/hseeberger/akka-http-json Hope this helps - -- Konrad `ktoso` Malawski Akka

Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-03-29 Thread Alan Burlison
On 29/03/2017 12:13, Konrad Malawski wrote: In principle sure, though not on anyones roadmap nowadays. You could contribute such a thing or find a json parser whihc has such failure mode - I'm unaware of any parser which has such failure mode though. I can't think of any way of doing it that

Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-03-29 Thread Konrad Malawski
In principle sure, though not on anyones roadmap nowadays. You could contribute such a thing or find a json parser whihc has such failure mode - I'm unaware of any parser which has such failure mode though. -- Konrad `ktoso` Malawski Akka @ Lightbend On

Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-03-28 Thread Alan Burlison
On 28/03/2017 22:51, Konrad Malawski wrote: Your unmarshaller (you did not say what you're using), should be configured to blow up then. The default Akka/HTTP one, namely Spray/JSON. The spray-json one can not do that. That's unfortunate :-( Is it possible in principle to extend it to

Re: [akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-03-28 Thread Konrad Malawski
Your unmarshaller (you did not say what you're using), should be configured to blow up then. The spray-json one can not do that. -- Konrad `ktoso` Malawski Akka @ Lightbend On 28 March 2017 at 23:37:57, Alan Burlison (alan.burli...@gmail.com) wrote: I'm

[akka-user] Akka HTTP/JSON: Rejecting requests with unknown fields

2017-03-28 Thread Alan Burlison
I'm using Akka's HTTP/JSON support to unmarshall JSON to case clasess using the standard "entity" and "as" mechanism. It works fine but if I supply JSON fields that don't have any corresponding case class fields they are silently ignored whereas I need the request to be rejected. I can't find any