- (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo {
//获取鼠标选中的字符串
NSArray *arr = (NSArray *)input;
NSString *string = [NSString stringWithFormat:@"%@",arr.firstObject];
//字符串转字典
NSDictionary *dic = [NSDictionary dictionaryWithString:string];
//字典中遍历出相关字段,生成property
[NSString findPropertyWithDic:dic];
//合并生成最终需要的字符串
NSString *result = [NSString allProperty];
//拷贝到剪贴板
[[NSPasteboard generalPasteboard] declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:nil];
[[NSPasteboard generalPasteboard] setString:result forType:NSStringPboardType];
return result;
}
-
Notifications
You must be signed in to change notification settings - Fork 0
chaoshenglu/json2property
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
复制json文本到剪贴板,然后就可以“粘贴成property”
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published