When working on real-world projects, there may be scenarios where different kinds of users access your application and enter information in to it. In the event that any aspect of the scenario was not handled properly, or any input data was not properly parsed, this can cause your application to crash or result in the corruption of your application data. Even though you validate all the input data used and accessed within your application when deployed in production, input data can interact with other external applications, which can place your application in jeopardy.
The purpose of this chapter is to understand the importance of validating input data in your application. Different validation techniques are available in the .NET Framework to validate JSON data and XML data.
In upcoming sections, we will focus on why it is important to validate input...