vstakhov / libucl

Universal configuration library parser
BSD 2-Clause "Simplified" License
1.63k stars 139 forks source link

Support HOCON format #163

Open vlsi opened 8 years ago

vlsi commented 8 years ago

Wikipedia: HOCON,[1] or Human-Optimized Config Object Notation is a format for human-readable data, and a superset of JSON and .properties. It is primarily used in conjunction with the Play framework, and is developed by Lightbend. It is also supported as a configuration format for Puppet_(software). [2]

There are multiple HOCON parser libraries (e.g. for Java, C#, python, etc). It's a pity UCL and HOCON diverged, so it is a pain to use UCL in a cross-language way (for instance, there's no Java API for UCL, there's no C# API for UCL).

I wonder if libucl can support HOCON format, so the same configuration format can be used in a cross-language way.

Here's informal specification of HOCON format: https://github.com/typesafehub/config/blob/master/HOCON.md

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39795881-support-hocon-format?utm_campaign=plugin&utm_content=tracker%2F483345&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F483345&utm_medium=issues&utm_source=github).
markus2330 commented 7 years ago

It would be a piece of cake to implement two plugins using libucl and some HOCON parser as plugins in Elektra. If you are interested, a similar plugin would be ni using the ni library.

And we are considering to do it ourselves if you need it, having support for UCL, HOCON, and S-Expressions (as byproduct of libucl as plugin) would be great.