我已经用C编译了YAJL库提供的代码。不知道为什么编译的程序没有解析我的文件或者我的文件格式错误?
我在解析 JSON 文件方面很新。
这是位于https://lloyd.github.io/yajl/的 C 代码示例 不知道我需要粘贴整个代码还是链接可以?
我的文件。
cat input_file.json
helllooooooooooo
当我运行程序./a.out json_reformat input_file.json
时,它什么也没做。./a.out -m json_reformat input_file.json
这也没有用。
我尝试使用 -u 和 -m 选项没有任何效果。
它像这样打印出 STDOUT 中的用法。
usage: json_reformat [options]
-m minimize json rather than beautify (default)
-u allow invalid UTF8 inside strings during parsing