Generating code to validate input data
First Claim
1. A method to be executed at least in part in a computing device for protecting an application against malformed input data, the method comprising:
- defining a schema for a well-formed data file containing input data;
providing input to a parser module for parsing the schema, the input to the parser module originating from two or more sources, one of the sources including instructions for custom parsing of the data file into validation code;
generate executable code based on the schema;
validating the input data using the executable code; and
providing validation results to the application,wherein the validation results include a quantitative report and a qualitative report of validation errors, the quantitative report including a total number of validation errors, the qualitative report including a severity level for each validation error, and wherein the input data is accepted when the severity level of each validation error does not exceed a first predetermined acceptance level and when the number of validation errors does not exceed a second predetermined acceptance level.
2 Assignments
0 Petitions
Accused Products
Abstract
Input data is validated by generating code based on the input data. A schema is generated based on the input data indicating conditions for the input file. The schema may then be customized based on a type of application to consume the input data. A validator executable code is generated based on the schema and checks the input file for compliance with the conditions determined by the schema. Results of validation may be provided to the application in yes or no form, or as number of non-compliances. In the latter case, the application may decide to accept or reject the data based on predetermined non-compliance levels.
23 Citations
17 Claims
-
1. A method to be executed at least in part in a computing device for protecting an application against malformed input data, the method comprising:
-
defining a schema for a well-formed data file containing input data; providing input to a parser module for parsing the schema, the input to the parser module originating from two or more sources, one of the sources including instructions for custom parsing of the data file into validation code; generate executable code based on the schema; validating the input data using the executable code; and providing validation results to the application, wherein the validation results include a quantitative report and a qualitative report of validation errors, the quantitative report including a total number of validation errors, the qualitative report including a severity level for each validation error, and wherein the input data is accepted when the severity level of each validation error does not exceed a first predetermined acceptance level and when the number of validation errors does not exceed a second predetermined acceptance level. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for protecting an application against malformed input data, comprising:
-
a system memory; a processing unit that, when executing instructions stored on the system memory, creates a validation engine configured to; execute a validation code generator module that is arranged to generate executable validation code based on a schema defining a well-formed data file containing input data and instructions from at least one parser module, the at least one parser module receiving inputs from two or more sources, one of the sources including instructions for custom parsing of the data file into validation code; receive the input data; execute the validation code to validate the input data; and provide validation results to the application, wherein the validation results include a quantitative report and a qualitative report of validation errors, the quantitative report including a total number of validation errors and the qualitative report including a severity level for each validation error. - View Dependent Claims (11, 12, 13, 14, 15)
-
-
16. A computer-readable storage medium having computer executable instructions for validating data in an input file, wherein the computer-readable storage medium does not consist of a propagated signal, the instructions comprising:
-
receiving a schema defining a well-formed data file containing input data; receiving instructions to a validation parser module for custom parsing of the input file into validation code; receiving instructions from the validation parser module for parsing the schema into executable validation code, the received instructions including a set of instructions for generic data types and another set of instructions for custom data types; generating executable validation code using the received instructions; validating the input data by executing the executable validation code on the input file; providing validation results to the application, the validation results include a quantitative report and a qualitative report of validation errors, the quantitative report including a total number of validation errors and the qualitative report including a severity level for each validation error; evaluating the validation results; when the severity level of each validation error does not exceed a first predetermined acceptance level and when the number of validation errors does not exceed a second predetermined acceptance level, accepting the input data; and when the severity level of any validation error exceeds the first predetermined acceptance level or when the number of validation errors exceeds the second predetermined acceptance level, repairing a malformed portion of the input data. - View Dependent Claims (17)
-
Specification