The first is a JSON object that when the data item for “fileURL” is parsed by the JSON class, it treats it as a string and no quotes are contained in the extracted string. (e.g. https://api.backendless.com/<AppID>/v1/files/directory1/file_ABCDEQRSTUVWX123456789__1.dat)
The download file API URL expects a string to be a URL that doesn’t have any leading or trailing quotes. So, by deleting the leading or trailing quotes before calling my common download file API function, the downloading a file works in both of the cases mention previously.