ios - Converting nsstring to macro (#define) -
this question has reply here:
convert nsstring nsinteger? 6 answersi receive from server next json:
{ ..... "id":"predifined_id", ... }
in code have int definition predifined_id:
#define predifined_id 5
which means if utilize predifined_id in code translated int = 5.
how can fetch value (5) when parsing json?
i have converted json nsdictionary
, value receive @"id" key, nsstring
in code utilize this:
nsinteger integervalue = [dict[@"id"] integervalue];
ios objective-c json nsstring
No comments:
Post a Comment