zendframework / zend-expressive-helpers

Helper classes for Expressive
BSD 3-Clause "New" or "Revised" License
33 stars 18 forks source link

Shouldn't we 400 if the JSON is invalid? #14

Closed rodmcnew closed 8 years ago

rodmcnew commented 8 years ago

Shouldn't we 400 if the JSON is invalid? Right now, json_decode will just return a null on this line:

https://github.com/zendframework/zend-expressive-helpers/blob/master/src/BodyParams/JsonStrategy.php#L32

michaelmoussa commented 8 years ago

@rodmcnew Thank you, but I'm closing this in favor of #12, which reports the same issue and was opened first. If you have any input on the proposed solution or any interest in working on it, please comment there.