how can I get this JSON content from this file?
You can get the JSON data response (before it's converted to Foundation objects by NSJSONSerialization) from
operation.responseString
(as NSString), oroperation.responseData
(as NSData).
You'll want the latter if you're going to attach it to an e-mail.
do I need register .json filetype to have possibility to send it using MFMailComposeViewController?
You need to call [MFMailComposeViewController -addAttachmentData:mimeType:fileName:]
. You can get the mime-type from the operation.response.allHeaderFields
NSDictionary. You can also use the official standard, application/json
, or text/json
, which is commonly used as well.