What is the format of the output data in APIs to use?

There are API and a conflict of developers.
From table usermeta API outputs a response in the format
 public 'data' => 
 array (size=2)
 0 => 
 public 'type' => string 'meta' (length=4)
 public 'id' => string '31' (length=2)
 public 'attributes' => 
 public 'key' => string 'social_id' (length=8)
 public 'value' => string '123' (length=3)
 public 'user_id' => int 2
 public 'site_id' => int 2
 public 'links' => 
 public 'self' => string 'https://example.com//metas/31' (length=29)

With such data difficult to work with one group, because to get the simple value -> key, you need to seek him more in response. Another group proposes to use the format
 public 'meta' => 
 public 'social_id' => 
 public 'id' => int 31
 public 'value' => int 123
 public 'user_id' => int 2
 public 'links' => string 'https://example.com//metas/31' (length=29)

But it all depends jsonapi.org but the work with the usual data as a 1 value, turns into a dance around the standard. Perhaps both sides are wrong and need to use another format to get such a response?
Or someone right?
The table has the structure id, user_id, site_id, key, value
July 8th 19 at 16:22
1 answer
July 8th 19 at 16:24
The lack of API in my opinion.
Casiraya answers and queries, write to transparent layer, which will revalidate cache, look for answers in it, if there not - do the query to cache its reply, to seek a simple answer to your request.
How many will live in the cache, how often will it pass validation - decide for yourself.

Find more questions by tags APIJSONPHP