I want to return response from my web service created in moodle as an object instead of array. So what changes i will need to make in the following function
public static function get_remote_courses_returns() {
return new external_multiple_structure(
new external_single_structure(
array(
'response' => new external_value(PARAM_RAW, 'user name'),
)
)
);
}
Also i dont want to hardcode the response array as shown in the above example. I mean i just want to tell moodle that an object will be returned in the response and the structure of that objected will be decided at the run time.