2018-11-16 01:30:38 -08:00
|
|
|
//
|
|
|
|
|
// MBIMJSONDataResponse.m
|
|
|
|
|
// kordophoned
|
|
|
|
|
//
|
|
|
|
|
// Created by James Magahern on 11/16/18.
|
|
|
|
|
// Copyright © 2018 James Magahern. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
#import "MBIMJSONDataResponse.h"
|
|
|
|
|
|
|
|
|
|
@implementation MBIMJSONDataResponse
|
|
|
|
|
|
|
|
|
|
+ (instancetype)responseWithJSONObject:(id)object
|
|
|
|
|
{
|
|
|
|
|
NSData *data = [NSJSONSerialization dataWithJSONObject:object options:0 error:NULL];
|
|
|
|
|
if (data == nil) {
|
|
|
|
|
return nil;
|
|
|
|
|
}
|
|
|
|
|
|
2018-11-21 01:38:43 -07:00
|
|
|
MBIMJSONDataResponse *response = [[self alloc] initWithData:data contentType:@"application/json; charset=utf-8"];
|
2018-11-16 01:30:38 -08:00
|
|
|
return response;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|