Config-UCL
view release on metacpan or search on metacpan
libucl-0.8.1/doc/libucl.3 view on Meta::CPAN
.TH "LIBUCL" "3" "27 December, 2014" "Libucl manual" ""
.SH NAME
.PP
\f[B]ucl_parser_new\f[], \f[B]ucl_parser_register_macro\f[],
\f[B]ucl_parser_register_variable\f[], \f[B]ucl_parser_add_chunk\f[],
\f[B]ucl_parser_add_string\f[], \f[B]ucl_parser_add_file\f[],
\f[B]ucl_parser_get_object\f[], \f[B]ucl_parser_get_error\f[],
\f[B]ucl_parser_free\f[], \f[B]ucl_pubkey_add\f[],
\f[B]ucl_parser_set_filevars\f[] \- universal configuration library
parser and utility functions
.SH LIBRARY
.PP
UCL library (libucl, \-lucl)
.SH SYNOPSIS
.PP
\f[C]#include\ <ucl.h>\f[]
.SH DESCRIPTION
.PP
Libucl is a parser and \f[C]C\f[] API to parse and generate \f[C]ucl\f[]
objects.
Libucl consist of several groups of functions:
.SS Parser functions
.PP
Used to parse \f[C]ucl\f[] files and provide interface to extract
\f[C]ucl\f[] object.
Currently, \f[C]libucl\f[] can parse only full \f[C]ucl\f[] documents,
for instance, it is impossible to parse a part of document and therefore
it is impossible to use \f[C]libucl\f[] as a streaming parser.
In future, this limitation can be removed.
.SS Emitting functions
.PP
Convert \f[C]ucl\f[] objects to some textual or binary representation.
Currently, libucl supports the following exports:
.IP \[bu] 2
\f[C]JSON\f[] \- valid json format (can possibly lose some original
data, such as implicit arrays)
.IP \[bu] 2
\f[C]Config\f[] \- human\-readable configuration format (lossless)
.IP \[bu] 2
\f[C]YAML\f[] \- embedded yaml format (has the same limitations as
\f[C]json\f[] output)
.SS Conversion functions
.PP
Help to convert \f[C]ucl\f[] objects to C types.
These functions are used to convert \f[C]ucl_object_t\f[] to C primitive
types, such as numbers, strings or boolean values.
.SS Generation functions
.PP
Allow creation of \f[C]ucl\f[] objects from C types and creating of
complex \f[C]ucl\f[] objects, such as hashes or arrays from primitive
\f[C]ucl\f[] objects, such as numbers or strings.
.SS Iteration functions
.PP
Iterate over \f[C]ucl\f[] complex objects or over a chain of values, for
example when a key in an object has multiple values (that can be treated
as implicit array or implicit consolidation).
.SS Validation functions
.PP
Validation functions are used to validate some object \f[C]obj\f[] using
json\-schema compatible object \f[C]schema\f[].
Both input and schema must be UCL objects to perform validation.
.SS Utility functions
.PP
Provide basic utilities to manage \f[C]ucl\f[] objects: creating,
removing, retaining and releasing reference count and so on.
.SH PARSER FUNCTIONS
.PP
Parser functions operates with \f[C]struct\ ucl_parser\f[].
.SS ucl_parser_new
.IP
.nf
\f[C]
struct\ ucl_parser*\ ucl_parser_new\ (int\ flags);
\f[]
.fi
.PP
Creates new parser with the specified flags:
.IP \[bu] 2
\f[C]UCL_PARSER_KEY_LOWERCASE\f[] \- lowercase keys parsed
.IP \[bu] 2
\f[C]UCL_PARSER_ZEROCOPY\f[] \- try to use zero\-copy mode when reading
files (in zero\-copy mode text chunk being parsed without copying
strings so it should exist till any object parsed is used)
.IP \[bu] 2
\f[C]UCL_PARSER_NO_TIME\f[] \- treat time values as strings without
parsing them as floats
.SS ucl_parser_register_macro
.IP
( run in 1.587 second using v1.01-cache-2.11-cpan-39bf76dae61 )