[ad_1]
I’m utilizing jsb.callStaticMethod to name from javascript to goal c
I name operate like this
cosnt obj={ consumer : "abc" , telephone:"1234"}
jsb.reflection.callStaticMethod("ViewController",
"callNativeDoSthing:",
JSON.stringtify(obj) );
How am i able to parse json string to make use of in goal c ?
I discovered the reply
NSError *e = nil;
NSData *information = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
NSDictionary *jsonDictionary = [NSJSONSerialization JSONObjectWithData: data options:
NSJSONReadingMutableContainers error: &e];
NSString* consumer=jsonDictionary["user"]
[ad_2]