GSettings Vala 文档不是很详细,我找不到从存储在 GSettings 中的字典数组中读取项目的方法。现在我的架构中有这个:
<key type="aa{ss}" name="services">
<default>[{"id": "postgresql", "name": "PostgreSQL"}]</default>
<summary></summary>
<description></description>
</key>
如何读取键的值id
和数组name
的第一个值?services
我尝试了很多可能性(例如使用get_value("services")
then get_child(0)
)来阅读字典,但它只是中断了,我不知道如何调试它。