-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Move JSON format bug fixes to new JSON2 format so existing clients will not fail. #6066
Conversation
…ll not fail. Add deprecation note for JSON format and use JSON2 in future proof code (angularjs/log importer).
1358623
to
1424764
Compare
looks good to me (assuming build passes) 👍 |
Move JSON format bug fixes to new JSON2 format so existing clients will not fail. Adds deprecation note for JSON format and uses JSON2 in future proof code (angularjs/log importer).
@diosmosis maybe we could link the API Export links (in datatable footers, and in the API listing page) to use |
What is JSON2 format? Why you use custom JSON2 object in browser instead of builtin window.JSON? |
There is no custom JSON2 object in the browser. See https://github.com/piwik/piwik/blob/master/CHANGELOG.md section "2.6.0 - deprecations" for information about this change and read developer.piwik.org for more information on Piwik development. |
What is JSON2 format? What this means for JavaScript client? In deprication notes you say about php. For example, this condition always 'll be true because not one browser has JSON2 global object, but has JSON. if (typeof JSON2 !== 'object') {
JSON2 = {};
} |
There is no JSON2 JS object used by Piwik, this change does not affect the tracker and the json2 library is not used by Piwik. The format is for API responses and has to do with the format query parameter sent in HTTP requests to Piwik. |
*HTTP requests sent to Piwiks reporting API. |
Adds deprecation note for JSON format and uses JSON2 in future proof code (angularjs/log importer).
Other JavaScript will automatically use this format when switched to angularjs.