[ACCEPTED]-What is the unit for the value for the aspnet:MaxJsonDeserializerMembers property in appSettings?-asp.net-mvc

Accepted answer
Score: 14

The unit of measure is the # of items (key/value 9 pairs) that can be deserialized. If your 8 JSON has 500 members (key/value pairs) and 7 your limit is 400 then it would fail.


You 6 must be careful making this limit too high. You 5 could easily DOS your server by submitting 4 frequent requests with large JSON payloads 3 and forcing your server to process them. By 2 keeping the number low the server will terminate 1 the request before processing begins.

Score: 2

Based on the source code of JsonValueProviderFactory, I would say 3 the aspnet:MaxJsonDeserializerMembers refers to a total number of key/value 2 pairs in JSON request, irrespective of whether 1 they are nested or not.

More Related questions