- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
Replace JSONArray with native Arrays for arguments and returned values #281
Conversation
| .getMyRights(function(error, result) { | ||
| // result is a JSON object | ||
| .getMyRights(function(error, rights) { | ||
| // result is an array of JSON objects | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resultrights is an array of JSON objects
(in js, the JSON is already parsed and we actually get a POJO object here)
| // result is a JSON object | ||
| .then((rights) => { | ||
| // result is an array of JSON objects | ||
| }); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same a above and other references below.
| ## Callback response | ||
|  | ||
| Resolves to a `JSON` object. | ||
| Resolves to an array of `JSON` objects. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above. Only true for java.
Resovles to an array of JSON objects rights.
| @benoitvidis > done I also changed  | 
| WIP: checking all security routes for inconsistencies | 
| Done. | 
| ```json | ||
| [ | ||
| { | ||
| controller: 'my-controller', action: 'my-action', index: '*', collection: '*', | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace:
controller: 'my-controller', action: 'my-action', index: '*', collection: '*',
by:
"controller": "my-controller", "action": "my-action", "index": "*", "collection": "*",
| "field2", | ||
| "field2 value" | ||
| ] | ||
| ] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace last ] by }
| @stafyniaksacha > done | 
Description
It makes little sense to force Android SDK clients to use
JSONArrayto pass a collection of objects, or to receive one as a return value/callback resolution value.Moreover, using
JSONArrayis inconsistent with the documentation and the way other SDKs are implemented.A PR is currently under preparation on the Android SDK to replace all
JSONArrayarguments and returned values. This PR updates the documentation accordingly.Other changes
hscanAPI documentation page was incorrectly labelledhmsetand thus it wasn't listed in the menuProfile.getPoliciesandProfile.setPoliciesJava code examplesPromisesuffix to all promisified*Credentialsmethod namesSecurity.getUserRightscallback example to allow it to be displayed for all language tabs*Credentialsmethods in the SDK ReferenceSecurity.hasCredentialsandSecurity.validateCredentialsdescriptions (they were copy-pasted fromSecurity.updateCredentials)Security.createProfileandSecurity.updateProfiletake an array of policies, instead of an object with 1policieskey containing the list of policiesSecurity.searchProfilesdocumentation inconsistencies