Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经创建了用于在 PHP 中创建客户的 API,客户端Android将使用POST请求来访问此 API。为了进行测试,我使用了 chrome postman,其中我使用了 post 数据:
Android
POST
{"name":"test","marks":["12","13","16"],"age":19}
它工作正常。
我得到了数组本身的标记["12","13","16"]。
["12","13","16"]
但是从 android 客户端我得到了 text ["12","13","14"]。
["12","13","14"]
可能的原因是什么?
将其发布为:
{"name":"test","marks":[12,13,16],"age":19}
您将其作为字符串发布在数组中["12","13","16"]
尝试使用它