[英]how to send a json with neseted fields and files in postman
I need to send a json object like this :我需要发送一个这样的 json 对象:
{
"title": "tour1",
"description": "lets go updated",
"date_time": "2021-06-30T06:14:00Z",
"time_zone": "Africa/Abidjan",
"host": 1,
"is_private": true,
"is_virtual": false,
"url": "www.google.com",
"photos": [
{
"image": "http://127.0.0.1:8000/meeting-photos/1.jpg"
},
{
"image": "http://127.0.0.1:8000/meeting-photos/5.jpg"
},
{
"image": "http://127.0.0.1:8000/meeting-photos/3_Os8n2RX.jpg"
}
],
"location":{
"lat": "0.0000000000000003",
"lng": "0.0000000000000002"
}
}
based on this question and answer i put the nested location field in bulk edit and the result was like this :基于此问题和答案,我将嵌套的位置字段进行了批量编辑,结果如下: but when i posted the json i got this error :但是当我发布 json 时,我收到了这个错误:
KeyError: 'location'
what should i do to solve this error?我应该怎么做才能解决这个错误?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.