Home  >  Article  >  Backend Development  >  第三方接口 - 请求PHP接口的POST传参数问题?

第三方接口 - 请求PHP接口的POST传参数问题?

WBOY
WBOYOriginal
2016-06-06 20:35:071572browse

请求PHP接口的时候,如果接口需要比较复杂的数据,比如3维数组,这时候应该直接POST一个三维数组,还是将三维数组先转化为JSON,再POST过去?为什么做的好好处是什么?从程序可维护下和安全性考虑

回复内容:

请求PHP接口的时候,如果接口需要比较复杂的数据,比如3维数组,这时候应该直接POST一个三维数组,还是将三维数组先转化为JSON,再POST过去?为什么做的好好处是什么?从程序可维护下和安全性考虑

json格式 理由兼容性好 易处理

复杂的结构,建议json

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn