@mattab opened this Issue on August 13th 2015 Member
  • document change to developers in changelog
@mattab commented on December 1st 2016 Member

Done in #10928

@mattab commented on October 21st 2019 Member

Is this still needed? feel free to close if not...

@Findus23 commented on October 21st 2019 Member

I guess this is useless as it will be removed with https://github.com/matomo-org/matomo/issues/6093 in Matomo 4.

@mattab commented on October 22nd 2019 Member

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

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?

@mattab commented on January 30th 2020 Member

Wondering if we really want to change this? is it worth the trouble of breaking BC for maybe quite a few api consumers...

@tsteur commented on January 30th 2020 Member

I don't think it is much of a priority?

@tsteur commented on February 20th 2020 Member

Need to make sure JSON2 doesn't change an expected response of [{}] to {}

Powered by GitHub Issue Mirror