Skip to content

utils: data parser and validator reimplementation

Aleš Mrázek requested to merge data-parser-and-validator-reimplementation into master

Implements #13 (closed)

Parser and Validator are implemented in separateed classes DataParser and DataValidator. With their help, two data schemas with the same or very similar structure are created.

The schemas are used for the following. Examples of usage can be found in tests.

DataParser schema

  • modeling data structures
    • witch more complex and custom types
    • more branching options for individual nodes possible
  • loading/parsing data from YAML/JSON reprezentation
  • exporting back to YAML/JSON
  • support for partial changes in data

DataValidator schema

  • modeling data structures
    • with primitive types, no custom types
    • as strict as possible
  • loads data from DataParser
  • transformation method for any attribute can be defined
  • validation method for every DataValidator node must be implemented
  • input for Lua configuration Jinja2 template
Edited by Vaclav Sraier

Merge request reports