Java后端接收前端JSON格式数据,输出的字符串为[Object object]的解决办法
json
适用于现代 C++ 的 JSON。
项目地址:https://gitcode.com/gh_mirrors/js/json

·
$.ajax({
type:'post',
url:'yourUrl',
traditional:true,
data:{
jsonArray:JSON.stringify(yourData),
},
success:function(){
}
})
注意在data那边,传的数据先用JSON.stringify将JS对象转成字符串的形式,再传到后台就不会有这个问题了,剩下的数据处理按照常的JSON解析流程走




适用于现代 C++ 的 JSON。
最近提交(Master分支:1 个月前 )
b451735f
Bumps [lukka/get-cmake](https://github.com/lukka/get-cmake) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/lukka/get-cmake/releases)
- [Commits](https://github.com/lukka/get-cmake/compare/ea004816823209b8d1211e47b216185caee12cc5...6b3e96a9bc9976b8b546346fdd102effedae0ca8)
---
updated-dependencies:
- dependency-name: lukka/get-cmake
dependency-version: 4.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 6 天前
568b708f
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.12.0 to 2.12.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/0634a2670c59f64b4a01f0f96f84700a4088b9f0...002fdce3c6a235733a90a27c80493a3241e56863)
---
updated-dependencies:
- dependency-name: step-security/harden-runner
dependency-version: 2.12.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 11 天前
更多推荐
所有评论(0)