Repository navigation
v0.4.0
HOCON from C and Python, on Linux, macOS and Windows.
Added
- libhocon, the C API in
include/hocon.h: parse a file or a string, typed getters by path, a subtree as JSON or HOCON, errors with file, line, column and caret. A zip per platform on the release. - The
zig-hoconPython package on libhocon: pyhocon's API, typed, safe to share between threads. Wheels for macOS, Linux (glibc and musl) and Windows on every Python from 3.10. ParseOptions.resolve = falsekeeps every${…}in the tree, forhocon.stringifyto write back.ParseOptions.ignore_unknown_fields = falsemakes a key the struct has no field forerror.UnknownField.hocon.parseFromSliceInDirLeakyreads text whose includes are relative to a directory;hocon.parseFromValueconverts ahocon.Valueyou already have into your struct.
Fixed
- A number read from text into a struct follows the JSON rules:
0x10,1_000andnanare errors, as in the spec and typesafe/config.
How much of the code in src/ is written by hand, the rest with AI, counted with git blame over the lines that are not empty, by who wrote the commit each line comes from; moved code stays its author's. The tests are left out: most of them are written with AI.
| share | |
|---|---|
| Tokenizer | 73 % |
| AST | 51 % |
| Value | 15 % |
| Config | 19 % |
| API and CLI | 2 % |
all of src/ |
22 % of 7545 lines |
| conformance to the spec | 99 % (442 of 445 tests) |