Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Add unsafe json body parser #6

Merged
merged 4 commits into from May 20, 2016
Merged

Conversation

haolinj
Copy link
Member

@haolinj haolinj commented May 20, 2016

And added type validation in body parser.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 62.745% when pulling 50234d2 on feature/bodyparser-cleanunsafe into eb8dbac on master.

@timechanter
Copy link
Contributor

@haolinj Can you please improve the tests to at least maintain coverage, if not improve it.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.9%) to 62.745% when pulling 6e26399 on feature/bodyparser-cleanunsafe into eb8dbac on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.02%) to 66.667% when pulling 28749f5 on feature/bodyparser-cleanunsafe into eb8dbac on master.

@haolinj
Copy link
Member Author

haolinj commented May 20, 2016

@timechanter More tests for the BodyParsers are added.

*/
def whitelistingJson(implicit executionContext: ExecutionContext): BodyParser[JsValue] = parse.json map clean
def whitelistingJson[A](implicit executionContext: ExecutionContext, reader: Reads[A]): BodyParser[A] = parse.json map clean validate as[A]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we probably want to leave the variants without type parameters in place.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.7%) to 67.308% when pulling 9cb6344 on feature/bodyparser-cleanunsafe into eb8dbac on master.

@haolinj
Copy link
Member Author

haolinj commented May 20, 2016

@danielnixon Added the non-type parameter parser back.

@dspasojevic dspasojevic merged commit 17af93c into master May 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants