|
NAMEKwalify - Kwalify schema for data structuresSYNOPSISuse Kwalify qw(validate); validate($schema, $data); Typically used together with YAML or JSON: use YAML; validate(YAML::LoadFile($schema_file), YAML::LoadFile($data_file)); use JSON; validate(decode_json($schema_data), decode_json($data)); DESCRIPTIONKwalify is a Perl implementation for validating data structures against the Kwalify schema. For a schema definition, see <http://www.kuwata-lab.com/kwalify/ruby/users-guide.01.html>, but see also below "SCHEMA DEFINITION".validate($schema_data, $data)Validate $data according to Kwalify schema specified in $schema_data. Dies if the validation fails.validate may be exported. SCHEMA DEFINITIONThe original schema definition document is not very specific about types and behaviour. Here's how Kwalify.pm implements things:
TECHNICAL NOTESAs Kwalify.pm is a pure validator and de-coupled from a parser (in fact, it does not need to deal with YAML at all, but just with pure perl data structures), there's no connection to the original validated document. This means that no line numbers are available to the validator. In case of validation errors the validator is only able to show a path-like expression to the data causing the error.AUTHORSlaven Rezić, <srezic@cpan.org>COPYRIGHT AND LICENSECopyright (C) 2006,2007,2008,2009,2010,2015 by Slaven RezićThis library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSOpkwalify, kwalify(1).Other non-XML schema languages: <http://rx.codesimply.com/>
Visit the GSP FreeBSD Man Page Interface. |