Sending images through json getting failed
Code:
NSData *imgd=UIImageJPEGRepresentation(Obj.thumbImage, 0.5);
[imgName insertObject:Obj.imageName atIndex:i];
[imgName1 insertObject:imgd atIndex:i];
[dic setObject:imgName forKey:@"name"];
[dic setObject:imgName1 forKey:@"image"];
[asiLoadingFormRequest setPostValue:contactName
forKey:@"receivername"];
[asiLoadingFormRequest setPostValue:[dic JSONRepresentation]
forKey:@"imagedata"];
Is it correct to way sending images through json?When i call server i am
getting following error message
"Error Domain=org.brautaset.JSON.ErrorDomain Code=1 \"Unsupported value
for key image in object\" UserInfo=0x9a611f0 {NSUnderlyingError=0x9a4a290
\"JSON serialisation not supported for NSConcreteMutableData\",
NSLocalizedDescription=Unsupported value for key image in object
Is it problem with Json that does not support for images?I have no idea
about this problem.any help will be appreciated.thanks in advance.
No comments:
Post a Comment