JSON字符串的几种格式
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json
免费下载资源
·
1.JSON数值 { “key” : value}
{
"key" : 520,
"key1" : 1314
}
2.JSON字符串 { “key” : “value”}
{
"key" : "我爱你",
"key1" : "一生一世"
}
3.JSON数组 { “key” : [value]}
{
"key" : [520, 1314],
"key1" : [520, 3344]
}
4.JSON对象 { “key” : {value}}
{
"key" : {"520": "我爱你"},
"key1" : {"1314": "一生一世"}
}
5.JSON对象数组 { “key” : [{“key1”: “value1”},{“key2”: “value2”}]}
{
"我" : [
{"key": "我爱你"},
{"key1": "一生一世"}
]
}
6.JSON数组对象 {“key”:{“key1”:[value1,value2]}}
{
"我" : {
[520,1314],
["我爱你", "一生一世"]
}
}
正确的json字符串的格式,前端报错消失:
res.write('{"ok":true,"msg":"注册成功"}')
GitHub 加速计划 / js / json
18
5
下载
适用于现代 C++ 的 JSON。
最近提交(Master分支:3 个月前 )
2134cb94
* change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance
* fix ci_static_analysis_clang (ci_clang_tidy)
* change NLOHMANN_JSON_FROM_WITH_DEFAULT to let NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT work with an empty JSON instance 4 天前
6057b31d
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* Use ubuntu-latest image to run Valgrind (#4575)
* :wrench: use Clang image to run valgrind
* :wrench: use Clang image to run valgrind
* :wrench: use Clang image to run valgrind
* :wrench: use Ubuntu image to run valgrind
* Use Clang image to run iwyu (#4574)
* :wrench: use Clang image to run iwyu
* :wrench: use Clang image to run iwyu
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :wrench: overwork astyle call
* :art: format code
* :hammer: clean up 6 天前
更多推荐
已为社区贡献3条内容
所有评论(0)