ini 解析库,config 解析库不完全列表

1. ini 解析库

ini 解析库很多,有些只支持读取,如 inih, libiniloader

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 安装。网上有人说它有一个缺陷,配置文件中的注释在回写时会丢失,未验证。

    http://www.hyperrealm.com/libconfig/libconfig_manual.html

  • 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.

    https://github.com/jbeder/yaml-cpp

References

https://stackoverflow.com/questions/12633/what-is-the-easiest-way-to-parse-an-ini-file-in-c

http://www.cplusplus.com/forum/unices/80716/

posted @ 2019-01-23 19:08  armme  阅读(2365)  评论(0编辑  收藏  举报