REST API with JSON content missing attributes with false values
|Assignee:||Jean-Philippe Lang||% Done:|
if an issue IS NOT private，using "GET /issues/<this_issue_id>.xml" can get "<is_private>false</is_private>" in the response;but if using "GET /issues/<this_issue_id>.json", there is no "is_private" key fonud in the response.
and the similar:
if a project IS NOT public，using "GET /projects/<this_project_id>.xml" can get "<is_public>false</is_public>" in the response;but if using "GET /issues/<this_project_id>.json", there is no "is_public" key fonud in the response.
Redmine version 2.6.6.stable
Ruby version 2.0.0-p645 (2015-04-13) [x86_64-linux]
Rails version 3.2.22
Database adapter Mysql2
#2 Updated by Yuichi HARADA about 2 years ago
- File 20788-missing-jsonvalue-false.patch added
JSON result was missing value of false or nil.
The reason is that we assume as 'true' the result of
[false].any? . However actual this result is 'false'.
I made a patch, and attach it.