title: Json Mapping using Restkit v0.20
body: <p>i am able to send request correctly but after receiving response i get </p>
  
  <pre><code>response.body ={"status":"success","loginToken":"xxxxyyyzzz"}
  </code></pre>
  
  <p>but with an error saying</p>
  
  <pre><code> It Failed: Error Domain=org.restkit.RestKit.ErrorDomain Code=1001 "No response descriptors     
  match the response loaded." UserInfo=0x2b55b0 {NSErrorFailingURLStringKey=http://192.168.1.71    
  /firstyii/index.php?r=site/login, NSLocalizedFailureReason=A 200 response was loaded from the 
  URL 'http://192.168.1.71/firstyii/index.php?r=site/login', which failed to match all (1) 
  response descriptors:
  
  &lt;RKResponseDescriptor: 0x2a5860 baseURL=http://192.168.1.71 pathPattern=/firstyii
  /index.php?r=site/login statusCodes=200-299&gt; failed to match: response path '/firstyii
  /index.php?r=site/login' did not match the path pattern '/firstyii/index.php?r=site/login'., 
  NSLocalizedDescription=No response descriptors match the response loaded., keyPath=null, 
  NSErrorFailingURLKey=http://192.168.1.71/firstyii/index.php?r=site/login, 
  NSUnderlyingError=0x2b6070 "No mappable object representations were found at the key paths 
  searched."}
  </code></pre>
  
  <p>LoginResponse.h</p>
  
  <pre><code>@interface LoginResponse : NSObject
  
  @property (nonatomic, strong) NSString *status;
  
  @property (nonatomic, strong) NSString *loginToken;
  
  +(RKObjectMapping*)defineLoginResponseMapping;
  
  @end
  </code></pre>
  
  <p>LoginResponse.m</p>
  
  <pre><code>#import "LoginResponse.h"
  
  
  @implementation LoginResponse
  
  @synthesize loginToken;
  
  @synthesize status;
  
  
  
  
  +(RKObjectMapping*)defineLoginResponseMapping   {
  
  RKObjectMapping *mapping = [RKObjectMapping mappingForClass:[LoginResponse class]];
  
  [mapping addAttributeMappingsFromDictionary:@{
   @"status":   @"status",
   @"loginToken":   @"loginToken",
    }];
  
  
  return mapping;
  
  }
  
  @end
  </code></pre>
  
  <p>Code in LoginManager.m</p>
  
  <pre><code>-(void)LoginWithUserName:(NSString *)username password:(NSString*)password {
  
  LoginRequest *dataObject = [[LoginRequest alloc] init];
  [dataObject setUsername:username];
  [dataObject setPassword:password];
  
  
  
     NSURL *baseURL = [NSURL URLWithString:@"http://192.168.1.71"];
  
  AFHTTPClient * client = [AFHTTPClient clientWithBaseURL:baseURL];
    [client setDefaultHeader:@"Accept" value:RKMIMETypeJSON];
  
  RKObjectManager *objectManager = [[RKObjectManager alloc] initWithHTTPClient:client];
  
  
  
  
  [RKMIMETypeSerialization registerClass:[RKNSJSONSerialization class] 
  forMIMEType:@"application/json"];
  
  
  RKObjectMapping *requestMapping =  [[LoginRequest defineLoginRequestMapping] inverseMapping];
  
  [objectManager addRequestDescriptor: [RKRequestDescriptor   
    requestDescriptorWithMapping:requestMapping objectClass:[LoginRequest class] rootKeyPath:nil 
   ]];
  // what to print
  RKLogConfigureByName("RestKit/Network", RKLogLevelTrace);
  RKLogConfigureByName("Restkit/Network", RKLogLevelDebug);
  
  RKObjectMapping *responseMapping = [LoginResponse defineLoginResponseMapping];
  
  [objectManager addResponseDescriptor:[RKResponseDescriptor 
  responseDescriptorWithMapping:responseMapping pathPattern:@"/firstyii/index.php?r=site/login" 
  keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]];
  
  
   [objectManager setRequestSerializationMIMEType: RKMIMETypeJSON];
  
    [objectManager postObject:dataObject path:@"/firstyii/index.php?r=site/login" 
  parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
      NSLog(@"It Worked: %@", [mappingResult array]);
  
  } failure:^(RKObjectRequestOperation *operation, NSError *error) {
      NSLog(@"It Failed: %@", error);
  
  }];
  }
  </code></pre>
  
  <p>i think that the code used above is to map response with array ,
  so i need code to map simple json like this one response.body={"status":"success","loginToken":"logingngngnnggngngae"}</p>