path: root/README.md
diff options
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-03-22 17:22:29 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-03-22 17:22:29 +0000
commitbfc6d68337150c52c8ce2dc6a7d19a9d1bd92795 (patch)
tree7f1e53bb95f9bc2624280f027e3f0aeb280f9667 /README.md
parent2ae6de7c252d1781a158740c2481220dfdd6cc77 (diff)
Update 20140302vendor/libucl/20140321
In particular this brings schema validation support.
Notes: svn path=/vendor/libucl/dist/; revision=263646 svn path=/vendor/libucl/20140321/; revision=263647; tag=vendor/libucl/20140321
Diffstat (limited to 'README.md')
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md
index b5a373a5d2dc..70f646efd753 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,26 @@
+[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)
+**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
+- [Introduction](#introduction)
+- [Basic structure](#basic-structure)
+- [Improvements to the json notation](#improvements-to-the-json-notation)
+ - [General syntax sugar](#general-syntax-sugar)
+ - [Automatic arrays creation](#automatic-arrays-creation)
+ - [Named keys hierarchy](#named-keys-hierarchy)
+ - [Convenient numbers and booleans](#convenient-numbers-and-booleans)
+- [General improvements](#general-improvements)
+ - [Commments](#commments)
+ - [Macros support](#macros-support)
+ - [Variables support](#variables-support)
+ - [Multiline strings](#multiline-strings)
+- [Emitter](#emitter)
+- [Validation](#validation)
+- [Performance](#performance)
+- [Conclusion](#conclusion)
## Introduction
This document describes the main features and principles of the configuration
@@ -262,6 +285,10 @@ Each UCL object can be serialized to one of the three supported formats:
* `Configuration` - nginx like notation;
* `YAML` - yaml inlined notation.
+## Validation
+UCL allows validation of objects. It uses the same schema that is used for json: [json schema v4](http://json-schema.org). UCL supports the full set of json schema with the exception of remote references. This feature is unlikely useful for configuration objects. Of course, schema definition can be in UCL format instead of JSON that sinplifies schemas writing. Moreover, since UCL supports multiple values for keys in an object it is possible to specify generic integer constraints `maxValues` and `minValues` to define the limits of values in a single key. UCL currently is not absolutely strict about validation schemas themselves, therefore UCL users should supply valid schemas (as it is defined in json-schema draft v4) to ensure that input is validated properly.
## Performance
Are UCL parser and emitter fast enough? Well, there are some numbers.