summaryrefslogtreecommitdiffstats
path: root/contrib/libucl/README.md
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-07-19 23:44:57 +0000
committerbapt <bapt@FreeBSD.org>2014-07-19 23:44:57 +0000
commit6f718e3669e9ecc1b1ca407a465d6ee20571a2b8 (patch)
treeba71cc26671c93ed9809f7cadb07734c0bddb4c7 /contrib/libucl/README.md
parent6095428430d025abcf6983536297f168bf62b45b (diff)
downloadFreeBSD-src-6f718e3669e9ecc1b1ca407a465d6ee20571a2b8.zip
FreeBSD-src-6f718e3669e9ecc1b1ca407a465d6ee20571a2b8.tar.gz
MFC: r263648, r264789, r266636
This brings: - schema validation - xpath-like interface for ucl objects Adapt pkg(7) to the new libucl API
Diffstat (limited to 'contrib/libucl/README.md')
-rw-r--r--contrib/libucl/README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/libucl/README.md b/contrib/libucl/README.md
index b5a373a..b6353d10 100644
--- a/contrib/libucl/README.md
+++ b/contrib/libucl/README.md
@@ -1,3 +1,26 @@
+# LIBUCL
+
+[![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, a schema definition can be in UCL format instead of JSON that simplifies 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 count 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 the input objects are validated properly.
+
## Performance
Are UCL parser and emitter fast enough? Well, there are some numbers.
OpenPOWER on IntegriCloud