2 added some clarification
source | link

If the receiving side needs a general recipient for your JSON messages, it can be useful to have the data node to be of the same format. So in this case it is useful to always have an array, so it can be parsed in the same way everytime.

If each response is going to be handled individually (different API calls from different methods), I can see your point, however it should be absolutely clear (from the API calls) when an array or one object is to be returned.

If the receiving side needs a general recipient for your JSON messages, it can be useful to have the data node to be of the same format. So always an array, so it can be parsed in the same way everytime.

If each response is going to be handled individually I can see your point, however it should be absolutely clear (from the API calls) when an array or one object is to be returned.

If the receiving side needs a general recipient for your JSON messages, it can be useful to have the data node to be of the same format. So in this case it is useful to always have an array, so it can be parsed in the same way everytime.

If each response is going to be handled individually (different API calls from different methods), I can see your point, however it should be absolutely clear (from the API calls) when an array or one object is to be returned.

1
source | link

If the receiving side needs a general recipient for your JSON messages, it can be useful to have the data node to be of the same format. So always an array, so it can be parsed in the same way everytime.

If each response is going to be handled individually I can see your point, however it should be absolutely clear (from the API calls) when an array or one object is to be returned.