Carter: Missing async versions for Bind and BindAndValidate
From version 10.0 Newtonsoft.Json supports async
serialization and deserialization from streams using JToken
(and derived).
Would be useful to add the async
versions for Bind<T>
and BindAndValidate<T>
extension methods, which will read the request body in a fully async manner:
var model = await req.BindAsync<MyModel>();
await res.Negotiate(model);
If interested I may send a PR.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (14 by maintainers)
Ah good spot! Thanks.
For asp.net core 3 we will probably move to the new json serializer that comes with it
On Tue, 16 Jul 2019 at 10:17, Stephen Pope notifications@github.com wrote:
Memory stream is a bad idea that’s why we don’t do that 🙂.