问题描述
我的意思是 YAML
, JSON
等等。 INI
请注意, XML
对于我的目的来说太冗长和太不方便,所以我们最后一个把它放在一边。 格式应该将数据存储为名为key-value对的数据,并允许嵌套和数组。不存在阵列并不重要。另外,类型意识(不仅仅是简单字符串返回数据的能力)受到高度赞赏。
我需要的是纯粹的 C 库,它提供了解析数据的API(编码是可选的,重要性较小)。当编译为ARM7时,它必须适合大约16-20 KiB。
我已经搜索和搜索,但找不到满足上述所有功能的工件
我发现,可能符合您的要求。
By "human-readable serialisation format" I mean YAML
, JSON
, INI
or like. Please note, XML
is too verbose and too inconvenient for my purposes, so let's leave it alone as the last resort.
The format should store the data as "named key -- value" pairs and allow for nesting and arrays. Absence of arrays is not critical, though. Also, type-awareness (ability to return data not only as plain strings) is highly appreciated.
What I need exactly is a pure C library, which provides an API for parsing data (encoding is optional and of lesser importance). It must fit into somewhat about 16-20 KiB, when compiled for ARM7.
I've googled and wikied around, but couldn't find an artifact satisfying all the above requirements.
I found Jansson a while back and it might fit your requirements.
这篇关于嵌入式系统的简约人性化可读序列化格式解析器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!