Commit Graph

9 Commits

Author SHA1 Message Date
Pranav K c76df96c70
Treat FormatExceptions and OverflowExceptions to be treated as model state errors (#15035)
In SystemTextJsonInputFormatter and NewtonsoftJsonInputFormatter, suppress
FormatExceptions and OverflowExceptions and instead report them as model state errors.

This makes the behavior more consistent between these formatters, model binders, and
the XML formatters

Fixes https://github.com/aspnet/AspNetCore/issues/14504
2019-10-17 10:06:57 -07:00
Ryan Brandenburg 8f99ca3fad Restructure tests 2019-06-19 16:10:54 -07:00
Ryan Brandenburg c7b401ffd7 Test fixes and feedback 2019-06-19 16:10:54 -07:00
Ryan Brandenburg e69cca6461 PR feedback 2019-06-19 16:10:54 -07:00
Ryan Brandenburg 6bd4b87d2c Additional tests 2019-06-19 16:10:54 -07:00
Pranav K 093df67c06
Avoid buffering during input formatting for longer than necessary (#9806)
* Avoid buffering during input formatting for longer than necessary

EnableRewind uses FileBufferingReadStream which is not disposed until the response is completed.
This results in holding on to internal buffers for significantly longer than necessary. Changing it
to  return the buffers immediately improved the allocations and throughput.
2019-05-03 06:45:52 -07:00
Pranav K f5ff181222
System.Text.Json based formatters (#8362)
* System.Text.Json based formatters

Fixes: https://github.com/aspnet/AspNetCore/issues/7256
2019-03-21 13:45:21 -07:00
mnltejaswini 2a08c6e54d Pass the formatter context to the CreateJsonSerializer. It gives ability to override and create serializer specific to the context (#8358)
* Pass the formatter context to the CreateJsonSerializer so that it gives ability to override and create serializer specific to the context
2019-03-20 12:01:41 -07:00
Ajay Bhargav Baaskaran 7a26d27e8b Merge branch 'release/2.2' 2019-02-14 16:08:51 -08:00