Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting API: Make json2 format the default json format (potential BC break) #8566

Closed
mattab opened this issue Aug 13, 2015 · 7 comments · Fixed by #15851
Closed

Reporting API: Make json2 format the default json format (potential BC break) #8566

mattab opened this issue Aug 13, 2015 · 7 comments · Fixed by #15851
Assignees
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Aug 13, 2015

  • document change to developers in changelog
@mattab mattab added the c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. label Aug 13, 2015
@mattab mattab added this to the 3.0.0 milestone Aug 13, 2015
@mattab mattab modified the milestones: 3.0.0, 3.0.0-b2 Oct 1, 2015
@mattab mattab modified the milestones: 3.0.0-b2, 3.0.0-b3 Oct 30, 2016
@mattab mattab modified the milestones: 3.0.0-b3, 3.0.0-b4 Nov 14, 2016
mattab added a commit to matomo-org/matomo-log-analytics that referenced this issue Dec 1, 2016
mattab added a commit to matomo-org/matomo-log-analytics that referenced this issue Dec 1, 2016
@mattab
Copy link
Member Author

mattab commented Dec 1, 2016

Done in #10928

@mattab mattab closed this as completed Dec 1, 2016
@mattab mattab added the Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. label Dec 2, 2016
@mattab mattab reopened this Dec 5, 2016
@mattab mattab modified the milestones: Mid term, 3.0.0-b4 Dec 5, 2016
@mattab
Copy link
Member Author

mattab commented Oct 21, 2019

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

@mattab mattab modified the milestones: Backlog (Help wanted), 4.0.0 Oct 21, 2019
@Findus23
Copy link
Member

I guess this is useless as it will be removed with #6093 in Matomo 4.

@mattab mattab removed this from the 4.0.0 milestone Oct 22, 2019
@mattab mattab reopened this Oct 22, 2019
@mattab
Copy link
Member Author

mattab commented Oct 22, 2019

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 #10928 and matomo-org/matomo-log-analytics#160 but reverted in #10959 and
matomo-org/matomo-log-analytics#161

because #10928 (comment)

-> if i understand correctly, the next step is to make the Mobile Apps use json2 format?

@mattab mattab added this to the 4.0.0 milestone Oct 22, 2019
@mattab
Copy link
Member Author

mattab commented Jan 30, 2020

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

@tsteur
Copy link
Member

tsteur commented Jan 30, 2020

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

@mattab mattab modified the milestones: 4.0.0, Backlog (Help wanted) Feb 20, 2020
@tsteur
Copy link
Member

tsteur commented Feb 20, 2020

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

@diosmosis diosmosis self-assigned this Apr 8, 2020
@mattab mattab changed the title Make json2 format the default json format Reporting API: Make json2 format the default json format (potential BC break) Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants