Done in #10928
I guess this is useless as it will be removed with https://github.com/matomo-org/matomo/issues/6093 in Matomo 4.
This issue is related to the json2
API data export format, an alternative to the standard json
format, which is currently un-documented but used in the app see: https://github.com/matomo-org/matomo/search?q=format%3Djson2&unscoped_q=format%3Djson2
We announced in 2.16 release:
The 'json' API format is considered deprecated. We ask all new code to use the 'json2' format. Eventually when Piwik 3.0 is released the 'json' format will be replaced with 'json2'. Differences in the json2 format include:
A bug in JSON formatting was fixed so API methods that return simple associative arrays like array('name' => 'value', 'name2' => 'value2') will now appear correctly as {"name":"value","name2":"value2"} in JSON API output instead of [{"name":"value","name2":"value2"}]. API methods like SitesManager.getSiteFromId & UsersManager.getUser are affected.
It was fixed in https://github.com/matomo-org/matomo/pull/10928 and https://github.com/matomo-org/matomo-log-analytics/pull/160 but reverted in https://github.com/matomo-org/matomo/pull/10959 and
https://github.com/matomo-org/matomo-log-analytics/pull/161
because https://github.com/matomo-org/matomo/pull/10928#issuecomment-264657043
-> if i understand correctly, the next step is to make the Mobile Apps use json2
format?