Sudzc deserializeAsDictionary: over written dictionary

后端 未结 5 1054
渐次进展
渐次进展 2021-01-17 08:06

The Sudzc generated code is over writing a dictionary for deserialized nodes. If I use the NSLog(@\"The Child Node: %@\", [[[element children] objectAtIndex:0] stringValue]

5条回答
  •  长情又很酷
    2021-01-17 08:46

    Solved (changed the soap.m):

    [d setObject:v forKey:[child name]]; 
    NSString* key = [child name]; 
    id check = [d objectForKey:key]; 
    if( check != nil ) { 
    
        NSInteger next = 1; 
        key = [NSString stringWithFormat:@"%@%d", [child name], next]; 
        check = [d objectForKey:key]; 
        while( check != nil ) { 
    
            next++; 
            key = [NSString stringWithFormat:@"%@%d", [child name], next]; 
            check = [d objectForKey:key]; 
        } 
        [d setObject:v forKey:key]; 
    } 
    [d setObject:v forKey:[child name]]; 
    

提交回复
热议问题