Home >Backend Development >PHP Tutorial >Interface writing problem

Interface writing problem

WBOY
WBOYOriginal
2016-12-01 00:00:38924browse

My interface looks like this. Only when there is a return, the data in json will have a value, otherwise it will be an empty string
Interface writing problem

Interface writing problem

My colleague told me that when he receives the data, he converts the data into an object using json, and if the data is empty, his entire program will explode, or my data will return null, which cannot be returned. I just don’t understand is this really the case
Interface writing problem

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