我一直在嘗試為三明治店制作訂單/購(gòu)物車(chē)應(yīng)用程序。在測(cè)試時(shí),我不斷收到與解碼前端工程師發(fā)送給我的 JSON 數(shù)據(jù)有關(guān)的錯(cuò)誤。下面是服務(wù)器收到的 POST 請(qǐng)求。{ "default_ingredients": [ { "id": 1, "name": "???? ??? (top)", "image_url": "https://media.subway.com/digital/Account_Updates/Assets/App-Base/Web_Images/Subway/en-us/Options/o_BreadItalian_customizer_large.png", "price": "0.00", "ingredient_category_id": 1 }, { "id": 23, "name": "???", "image_url": "https://media.subway.com/digital/Account_Updates/Assets/App-Base/Web_Images/Subway/en-us/OptionsIds/10133_customizer_large.png", "price": "0.00", "ingredient_category_id": 3 }, ], "added_ingredients": [ { "id": 18, "name": "???", "image_url": "https://media.subway.com/digital/Account_Updates/Assets/App-Base/Web_Images/Subway/en-us/Options/o_TurkeyBasedHamSalamiBologna_customizer_large.png", "price": "0.00", "ingredient_category_id": 2 }, { "id": 19, "name": "????", "image_url": "https://media.subway.com/digital/Account_Updates/Assets/App-Base/Web_Images/Subway/en-us/Options/o_Pepperoni_customizer_large.png", "price": "1800.00", "ingredient_category_id": 2 }, ], "product_name": "???? ???",}下面是我的訂單應(yīng)用程序的 views.py
(Django、Python)如何修復(fù) json.decoder.JSONDecodeError?
繁華開(kāi)滿(mǎn)天機(jī)
2022-12-20 11:06:49