ini 解析库,config 解析库不完全列表
1. ini 解析库
ini 解析库很多,有些只支持读取,如 inih, libiniloader
-
ini 解析库比较
-
iniparser
读写都支持。
-
inicpp
C++ parser of INI files with schema validation. 读写都支持。
-
SDL_Config
SDL_Config is a library designed for reading and writing configuration files in an easy, cross-platform way.
-
libini
An INI file parser that can read, edit and create large INI files. Usable under Microsoft Windows, DOS, Linux, etc. Supported languages are C, C++, Visual Basic, Java, TCL, Perl, Python, etc (DLL and SWIG capable).
-
simpleini
Cross-platform C++ library providing a simple API to read and write INI-style configuration files
-
minIni
minIni is a programmer's library to read and write "INI" files in embedded systems.
2. 其他 config 解析库
-
Boost.PropertyTree
The Property Tree library provides a data structure that stores an arbitrarily deeply nested tree of values, indexed at each level by some key. Each node of the tree stores its own value, plus an ordered list of its subnodes and their keys. The tree allows easy access to any of its nodes by means of a path, which is a concatenation of multiple keys.
In addition, the library provides parsers and generators for a number of data formats that can be represented by such a tree, including XML, INI, and JSON.
https://www.boost.org/doc/libs/1_59_0/doc/html/property_tree.html
-
Boost.Program_options
The program_options library allows program developers to obtain program options, that is (name, value) pairs from the user, via conventional methods such as command line and config file.
https://www.boost.org/doc/libs/1_36_0/doc/html/program_options.html
-
libconfig
一个用于读取,操作和编写结构化配置文件的库,类 JSON 语法,ubuntu 可直接 apt 安装。网上有人说它有一个缺陷,配置文件中的注释在回写时会丢失,未验证。
-
A C++ Config File Parser
This article describes a small, light-weight parser for structured config files. Unlike INI-Files, config files may be sub-structured arbitrarily deep. Config files support the expansion of symbolic values from previously defined variables and environment variables.
https://www.codeproject.com/Articles/26145/A-C-Config-File-Parser
-
yaml-cpp
yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.
References
https://stackoverflow.com/questions/12633/what-is-the-easiest-way-to-parse-an-ini-file-in-c