Skip to content

Nice to have: DCDictionaryMapping #60

Open
@albsala

Description

@albsala

It would be nice to have a class like "DCArrayMapping" for NSDictionary, because I have a JSON like this:

{
    "_id":12345,
    "localizedContent":{
        "en":{
            "name":"english name"
        },
        "es":{
            "name":"spanish name"
        }
    }
}

... with an undetermined number of languages, so I'm trying to map it to an object like this:

@interface MyLocalizedContent : NSObject

@property (nonatomic, strong) NSString *name;

@end


@interface MyObject : NSObject

@property (nonatomic, strong) NSNumber *identifier;
@property (nonatomic, strong) NSDictionary *localizedContent;

@end

... and I don't know how to do it without this "DCDictionaryMapping".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions