restApi returns list elements with one element instead of array in json

restApi return list elements by one element instead of array in json.

how can i fix it?

for example:

i have one user in my Roster and restApi return for me an json like this

**{“rosterItem”:{“jid”:“ag-hamid”,“subscriptionType”:“0”,“groups”:null}} **

but correct format is

{“rosterItem”:[{“jid”:“ag-hamid”,“subscriptionType”:“0”,“groups”:null}]}