小程序
小游戏
企业微信
微信支付
扫描小程序码分享
4 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
都是大佬,看不懂
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
你可以把你的json发出来 给你改一版本,然后你再研究研究吧
{
"_id":"79550af26029e69604e4c14c13f85c60","fenlei":"经典套餐","name":"宫保鸡丁套餐","price":35,"sell":0,"status":"上架","_createTime":1613358742773,"_updateTime":1613358742773,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=4033883906,2731252133&fm=26&gp=0.jpg"
},
"_id":"28ee4e3e6029e6b6054fd8021ff3d887","fenlei":"经典套餐","name":"狮子头套餐","price":25,"sell":2,"status":"上架","_createTime":1613358774645,"_updateTime":1613358774645,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3532063679,1935243818&fm=26&gp=0.jpg"
"_id":"28ee4e3e6029e6d6054fde646c53d05b","fenlei":"面食","name":"刀削面","price":15,"sell":2,"status":"上架","_createTime":1613358806929,"_updateTime":1613358943110,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=308247864,386306050&fm=26&gp=0.jpg"
"_id":"b00064a76029e77305061e796dc97e38","fenlei":"面食","name":"牛肉拉面","price":15,"sell":0,"status":"上架","_createTime":1613358963507,"_updateTime":1613358963507,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=4283016849,3128990035&fm=26&gp=0.jpg"
"_id":"79550af26029e78e04e4f2c737b08c21","fenlei":"面食","name":"老北京炸酱面","price":15,"sell":0,"status":"上架","_createTime":1613358990572,"_updateTime":1613358990572,"icon":"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=4217671986,1894020003&fm=26&gp=0.jpg"
"_id":"28ee4e3e6029e7b805500db649913288","fenlei":"面食","name":"兰州拉面","price":12,"sell":1,"status":"上架","_createTime":1613359032544,"_updateTime":1613359032544,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3686050677,567719515&fm=26&gp=0.jpg"
"_id":"b00064a76029e7ce0506300b2c4a29ed","fenlei":"经典套餐","name":"大盘鸡 ","price":108,"sell":0,"status":"上架","_createTime":1613359054023,"_updateTime":1613359054023,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=266238080,1902329614&fm=26&gp=0.jpg"
"_id":"79550af26029e80004e5090f1510d3dc","fenlei":"店长推荐","name":"杭州小笼包","price":24,"sell":0,"status":"上架","_createTime":1613359104541,"_updateTime":1613385789470,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3156899831,2997303086&fm=26&gp=0.jpg"
"_id":"b00064a76029e81205063dd309806711","fenlei":"面食","name":"炒刀削","price":14,"sell":0,"status":"上架","_createTime":1613359122726,"_updateTime":1613359122726,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1627026643,2380559582&fm=26&gp=0.jpg"
"_id":"28ee4e3e6029e8320550270d20ac9657","fenlei":"面食","name":"河南烩面","price":14,"sell":0,"status":"上架","_createTime":1613359154317,"_updateTime":1613359154317,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3521990855,1881261623&fm=26&gp=0.jpg"
"_id":"b00064a76029f564050916511cf25667","fenlei":"面食","name":"岐山臊子面","price":16,"sell":0,"status":"上架","_createTime":1613362532882,"_updateTime":1613362532882,"icon":"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3192640871,229058421&fm=26&gp=0.jpg"
}
//我现在正在B站学习json编码逻辑,感谢各位大佬不厌其烦指导
"dishesList": [{
}]
中间用逗号隔开,最前面和最后面加中括号 [ ] 包裹
百度了解一下JSON基础结构是啥吧。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
都是大佬,看不懂
你可以把你的json发出来 给你改一版本,然后你再研究研究吧
{
"_id":"79550af26029e69604e4c14c13f85c60","fenlei":"经典套餐","name":"宫保鸡丁套餐","price":35,"sell":0,"status":"上架","_createTime":1613358742773,"_updateTime":1613358742773,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=4033883906,2731252133&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e6b6054fd8021ff3d887","fenlei":"经典套餐","name":"狮子头套餐","price":25,"sell":2,"status":"上架","_createTime":1613358774645,"_updateTime":1613358774645,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3532063679,1935243818&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e6d6054fde646c53d05b","fenlei":"面食","name":"刀削面","price":15,"sell":2,"status":"上架","_createTime":1613358806929,"_updateTime":1613358943110,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=308247864,386306050&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e77305061e796dc97e38","fenlei":"面食","name":"牛肉拉面","price":15,"sell":0,"status":"上架","_createTime":1613358963507,"_updateTime":1613358963507,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=4283016849,3128990035&fm=26&gp=0.jpg"
},
{
"_id":"79550af26029e78e04e4f2c737b08c21","fenlei":"面食","name":"老北京炸酱面","price":15,"sell":0,"status":"上架","_createTime":1613358990572,"_updateTime":1613358990572,"icon":"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=4217671986,1894020003&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e7b805500db649913288","fenlei":"面食","name":"兰州拉面","price":12,"sell":1,"status":"上架","_createTime":1613359032544,"_updateTime":1613359032544,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3686050677,567719515&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e7ce0506300b2c4a29ed","fenlei":"经典套餐","name":"大盘鸡 ","price":108,"sell":0,"status":"上架","_createTime":1613359054023,"_updateTime":1613359054023,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=266238080,1902329614&fm=26&gp=0.jpg"
},
{
"_id":"79550af26029e80004e5090f1510d3dc","fenlei":"店长推荐","name":"杭州小笼包","price":24,"sell":0,"status":"上架","_createTime":1613359104541,"_updateTime":1613385789470,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3156899831,2997303086&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e81205063dd309806711","fenlei":"面食","name":"炒刀削","price":14,"sell":0,"status":"上架","_createTime":1613359122726,"_updateTime":1613359122726,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1627026643,2380559582&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e8320550270d20ac9657","fenlei":"面食","name":"河南烩面","price":14,"sell":0,"status":"上架","_createTime":1613359154317,"_updateTime":1613359154317,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3521990855,1881261623&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029f564050916511cf25667","fenlei":"面食","name":"岐山臊子面","price":16,"sell":0,"status":"上架","_createTime":1613362532882,"_updateTime":1613362532882,"icon":"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3192640871,229058421&fm=26&gp=0.jpg"
}
//我现在正在B站学习json编码逻辑,感谢各位大佬不厌其烦指导
{
"dishesList": [{
"_id":"79550af26029e69604e4c14c13f85c60","fenlei":"经典套餐","name":"宫保鸡丁套餐","price":35,"sell":0,"status":"上架","_createTime":1613358742773,"_updateTime":1613358742773,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=4033883906,2731252133&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e6b6054fd8021ff3d887","fenlei":"经典套餐","name":"狮子头套餐","price":25,"sell":2,"status":"上架","_createTime":1613358774645,"_updateTime":1613358774645,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3532063679,1935243818&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e6d6054fde646c53d05b","fenlei":"面食","name":"刀削面","price":15,"sell":2,"status":"上架","_createTime":1613358806929,"_updateTime":1613358943110,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=308247864,386306050&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e77305061e796dc97e38","fenlei":"面食","name":"牛肉拉面","price":15,"sell":0,"status":"上架","_createTime":1613358963507,"_updateTime":1613358963507,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=4283016849,3128990035&fm=26&gp=0.jpg"
},
{
"_id":"79550af26029e78e04e4f2c737b08c21","fenlei":"面食","name":"老北京炸酱面","price":15,"sell":0,"status":"上架","_createTime":1613358990572,"_updateTime":1613358990572,"icon":"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=4217671986,1894020003&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e7b805500db649913288","fenlei":"面食","name":"兰州拉面","price":12,"sell":1,"status":"上架","_createTime":1613359032544,"_updateTime":1613359032544,"icon":"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=3686050677,567719515&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e7ce0506300b2c4a29ed","fenlei":"经典套餐","name":"大盘鸡 ","price":108,"sell":0,"status":"上架","_createTime":1613359054023,"_updateTime":1613359054023,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=266238080,1902329614&fm=26&gp=0.jpg"
},
{
"_id":"79550af26029e80004e5090f1510d3dc","fenlei":"店长推荐","name":"杭州小笼包","price":24,"sell":0,"status":"上架","_createTime":1613359104541,"_updateTime":1613385789470,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3156899831,2997303086&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029e81205063dd309806711","fenlei":"面食","name":"炒刀削","price":14,"sell":0,"status":"上架","_createTime":1613359122726,"_updateTime":1613359122726,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1627026643,2380559582&fm=26&gp=0.jpg"
},
{
"_id":"28ee4e3e6029e8320550270d20ac9657","fenlei":"面食","name":"河南烩面","price":14,"sell":0,"status":"上架","_createTime":1613359154317,"_updateTime":1613359154317,"icon":"https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=3521990855,1881261623&fm=26&gp=0.jpg"
},
{
"_id":"b00064a76029f564050916511cf25667","fenlei":"面食","name":"岐山臊子面","price":16,"sell":0,"status":"上架","_createTime":1613362532882,"_updateTime":1613362532882,"icon":"https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3192640871,229058421&fm=26&gp=0.jpg"
}]
}
中间用逗号隔开,最前面和最后面加中括号 [ ] 包裹
内容为Incorrect type. Expected "object"
只能写一条数据
{
"_id":"79550af26029e69604e4c14c13f85c60","fenlei":"经典套餐","name":"宫保鸡丁套餐","price":35,"sell":0,"status":"上架","_createTime":1613358742773,"_updateTime":1613358742773,"icon":"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=4033883906,2731252133&fm=26&gp=0.jpg"
}
百度了解一下JSON基础结构是啥吧。