Serialize Data Structures in C —— stackoverflow.com

来源:互联网 发布:网络开拓视野的实例 编辑:程序博客网 时间:2024/05/17 07:19

原文: http://stackoverflow.com/questions/371371/serialize-data-structures-in-c

I'd like a C library that can serialize my data structures to disk, and then load them again later. It should accept arbitrarily nested structures, possibly with circular references.

I presume that this tool would need a configuration file describing my data structures. The library is allowed to use code generation, although I'm fairly sure it's possible to do this without it.

Note I'm not interested in data portability. I'd like to use it as a cache, so I can rely on the environment not changing.

Thanks.


Results

Someone suggested Tpl which is an awesome library, but I believe that it does not do arbitrary object graphs, such as a tree of Nodes that each contain two other Nodes.

Another candidate is Eet, which is a project of the Enlightenment window manager. Looks interesting but, again, seems not to have the ability to serialize nested structures.



原创粉丝点击