问题描述
我正在尝试为无逻辑模板运行 mustache C 库的示例应用程序。我正在使用 json-c 库来解析 JSON。
mustache C library,
mustache example(此链接上的第一个示例)
A typical Mustache template:
Hello {{name}}
You have just won {{value}} dollars!
{{#in_ca}}
Well,{{taxed_value}} dollars,after taxes.
{{/in_ca}}
Given the following hash:
{
"name": "Chris","value": 10000,"taxed_value": 10000 - (10000 * 0.4),"in_ca": true
}
我已经尝试将 mustache C 库安装到本地机器上,同时提供以下 JSON 作为散列将得到如下解析错误。
root@userx:/home/userx/mustach# ./mustach json template
Can't load json file json
reason: json_tokener_parse_ex Failed: object value separator ',' expected
另外,我尝试过演示链接并得到相同的解析错误。 Test/Demo
Invalid JSON: {
"name": "Chris","in_ca": true
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)