GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing cpp.libhunt.com — LIBUCL Alternatives - C++ JSON | LibHunt LIBUCLUniversal configuration library parser
Take the C++ Developer Survey
- About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email.
Take the survey »
Popularity
6.2
Stable
Activity
8.1
Growing
Stars
1,745
Watchers
45
Forks
168
Last Commit
Code Quality Rank:
L2
Programming language: C
License: BSD 2-clause "Simplified" License
Tags:
JSON
Latest version: v0.8.1
LIBUCL alternatives and similar libraries
Based on the "JSON" category.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
Promo
www.saashub.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
Do you think we are missing an alternative of LIBUCL or a related project? Popular ComparisonsREADMELIBUCLTable of Contents generated with DocToc
IntroductionThis document describes the main features and principles of the configuration
language called If you are looking for the libucl API documentation you can find it at [this page](doc/api.md). Basic structureUCL is heavily infused by
Improvements to the json notation.There are various things that make ucl configuration more convenient for editing than strict json: General syntax sugar
is equal to:
is equal to:
Automatic arrays creation
is converted to:
Named keys hierarchyUCL accepts named keys and organize them into objects hierarchy internally. Here is an example of this process:
is converted to the following object:
Plain definitions may be more complex and contain more than a single level of nested objects:
is presented as:
Convenient numbers and booleans
General improvementsCommentsUCL supports different style of comments:
Multiline comments may be nested:
Macros supportUCL supports external macros both multiline and single line ones:
Moreover, each macro can accept an optional list of arguments in braces. These arguments themselves are the UCL object that is parsed and passed to a macro as options:
UCL also provide a convenient
or URL (if ucl is built with url support provided by either
Priorities are used by UCL parser to manage the policy of objects rewriting during including other files as following:
By default, the priority of top-level object is set to zero (lowest priority). Currently,
you can define up to 16 priorities (from 0 to 15). Includes with bigger priorities will
rewrite keys from the objects with lower priorities as specified by the policy. The priority
of the top-level or any other object can be changed with the
Variables supportUCL supports variables in input. Variables are registered by a user of the UCL parser and can be presented in the following forms:
UCL currently does not support nested variables. To escape variables one could use double dollar signs:
However, if no valid variables are found in a string, no expansion will be performed (and Multiline stringsUCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects:
In this example
Single quoted stringsIt is possible to use single quoted strings to simplify escaping rules. All values passed in single quoted strings are NOT escaped, with two exceptions: a single
EmitterEach UCL object can be serialized to one of the four supported formats:
ValidationUCL allows validation of objects. It uses the same schema that is used for json: json schema v4. 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 PerformanceAre UCL parser and emitter fast enough? Well, there are some numbers. I got a 19Mb file that consist of ~700 thousand lines of json (obtained via http://www.json-generator.com/). Then I checked jansson library that performs json parsing and emitting and compared it with UCL. Here are results:
So far, UCL seems to be significantly faster than jansson on parsing and slightly faster on emitting. Moreover, UCL compiled with optimizations (-O3) performs significantly faster:
You can do your own benchmarks by running ConclusionUCL has clear design that should be very convenient for reading and writing. At the same time it is compatible with JSON language and therefore can be used as a simple JSON parser. Macro logic provides an ability to extend configuration language (for example by including some lua code) and comments allow to disable or enable the parts of a configuration quickly. Do not miss the trending, libraries, news and articles with our weekly report.
Spin The Wheel Of Names
for a cryptographically secure random name picker.
Schedule a when to meet poll. |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |