Home > Back-end >  Interface response message to grace?
Interface response message to grace?

Time:12-11

Background:
Location: XXXX company conference room

Front A: your backend interface returns A json too complicated! I this case only the user's real name and age, the results you return me a bunch of dozens of field...

The front-end B: yes! Is ah! Id information is sensitive, here also don't need to use, you have returned to the pages, and password returned to! Thanks to is encrypted ~

Backend side dish: extra fields you don't tube is ok, and do not affect you ~, really bad I copy a new object to you!

The boss is away without a word, under is wrinkly to knit the brows ~


this kind of situation we have any elegant solution effectively, the author of the following do you think is there any thing I can do with this scheme improve? Welcome to actively communicate ~

interface returns a large number of useless or sensitive field?

CodePudding user response:

To construct different QueryVo object to return

CodePudding user response:

reference 1/f, Iot - Mr Qu response:
construct different QueryVo object returns
so if multiple places need not produce a large number of objects? More and more difficult to maintain

CodePudding user response:

According to the parameter returns a Map is not to go, the client is still a json, the back-end can also transfer data dynamically, social network API is so dry,

CodePudding user response:

reference icoolno1 reply: 3/f
according to the parameter returns a Map is not to go, the client is still a json, the back-end can also transfer data dynamically, social network API is so dry,
considered before the Map, but you still want copies of each, which need to bring in the past, what need to filter out, nested complex is very troublesome
  • Related