json_scheme_validator library

Classes

JsonValidatorByScheme
class is instantiated via calling constructor passing in scheme of json record and json record scheme is expected as a Map of key string with value of List: such list would be in the following structure of elements: first element: datatype of item second element: a bool representing whether item is required in record or not third element: a list representing the possible values in record for the item. (if no validation on value needed, do not pass this third list element) example: scheme {"my salute item": ["String", true, "Hi", "Hello"]} means that the valid record would be {"my salute item": "Hi"} or {"my salute item": "Hello"}