Open hideya opened 8 years ago
As pointed out in https://github.com/strongloop/loopback-sdk-ios/pull/83#issuecomment-174502633, "the response ("returns" argument) is always passed as a JSON object and it's up to the API caller to extract individual arguments from the response, together with applying any type conversions as necessary."
One approach to hide that conversion process from SDK users is to add "accepts" and "returns" to SLRESTContract and perform the conversion in SLObject automatically. This should simplify the usage.
SLObject
As pointed out in https://github.com/strongloop/loopback-sdk-ios/pull/83#issuecomment-174502633, "the response ("returns" argument) is always passed as a JSON object and it's up to the API caller to extract individual arguments from the response, together with applying any type conversions as necessary."
One approach to hide that conversion process from SDK users is to add "accepts" and "returns" to SLRESTContract and perform the conversion in
SLObject
automatically. This should simplify the usage.