Kwalify 0.7.0 - parser, schema validator, and data binding for YAML and JSON


I have released Kwalify 0.7.0.

Kwalify is an integrated tool for YAML and JSON.
Kwalify contains parser, schema validator, and data binding tool.

This release has many enhancements and changes.
for details.

From this release, Kwalify supports data binding.
If you specify class name in schema definition, Kwalify parses YAML/
and create instance object of that class instead of Hash object.
Data binding makes handling YAML easier.


  • schema file (config.schema.yaml)

    type: map
    class: Config
    “host”: { type: str, required: true }
    “port”: { type: int }
    “user”: { type: str, required: true }
    “pass”: { type: str, required: true }

  • configuration file (config.yaml)

    host: localhost
    user: user1
    pass: password1

  • ruby program (ex1.rb)

    class definition

    require ‘kwalify/util/hashlike’
    class Config
    include Kwalify::Util::HashLike # defines [], []=, …
    attr_accessor :host, :posrt, :user, :pass
    def initialize
    @port = 80

    create validator object

    require ‘kwalify’
    schema = Kwalify::Yaml.load_file(‘config.schema.yaml’)
    validator =

    parse configuration file with data binding

    parser =
    parser.data_binding = true # enable data binding
    config = parser.parse_file(‘config.yaml’)
    p config #=> #<Config:0x542590 @user=“user1”, @port=80,
    # @pass=“password1”, @host=“localhost”>

See User’s Guide for details.