All Projects → liangdahong → BMExport

liangdahong / BMExport

Licence: MIT license
一个 JSON 转 Objective-C,Swift class, Swift struct Model 属性的 Mac 小工具,【点击直接下载 https://github.com/liangdahong/BMExport/releases/download/2.0/BMExport2.0.dmg 】。

Programming Languages

objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to BMExport

GLM
Code for the General Lake Model
Stars: ✭ 30 (+36.36%)
Mutual labels:  model
shyft
⬡ Shyft is a server-side framework for building powerful GraphQL APIs 🚀
Stars: ✭ 56 (+154.55%)
Mutual labels:  model
ldview
Real-time 3D viewer for displaying LDraw models
Stars: ✭ 65 (+195.45%)
Mutual labels:  model
factoria
Simplistic model factory for Node/JavaScript
Stars: ✭ 49 (+122.73%)
Mutual labels:  model
php-mvc
Mini framework para aplicaciones PHP con el patrón MVC
Stars: ✭ 35 (+59.09%)
Mutual labels:  model
TorXakis
A tool for Model Based Testing
Stars: ✭ 40 (+81.82%)
Mutual labels:  model
powerform
A powerful form model.
Stars: ✭ 46 (+109.09%)
Mutual labels:  model
compose plantuml
Generate Plantuml graphs from docker-compose files
Stars: ✭ 77 (+250%)
Mutual labels:  model
grafikon
Timetables for model railway. Useful for meets with modules (like FREMO, Free-mo etc).
Stars: ✭ 19 (-13.64%)
Mutual labels:  model
backscatter
Reactive extension for Backbone
Stars: ✭ 17 (-22.73%)
Mutual labels:  model
go-topics
Latent Dirichlet Allocation
Stars: ✭ 23 (+4.55%)
Mutual labels:  model
PRISM
An alternative to MCMC for rapid analysis of models
Stars: ✭ 40 (+81.82%)
Mutual labels:  model
db-safedelete
Attempts to invoke force delete, if it fails - falls back to soft delete
Stars: ✭ 16 (-27.27%)
Mutual labels:  model
covid19 scenarios data
Data preprocessing scripts and preprocessed data storage for COVID-19 Scenarios project
Stars: ✭ 43 (+95.45%)
Mutual labels:  model
django-serializable-model
Django classes to make your models, managers, and querysets serializable, with built-in support for related objects in ~150 LoC
Stars: ✭ 15 (-31.82%)
Mutual labels:  model
gltf-bounding-box
Computes the global bounding box of a gltf model
Stars: ✭ 18 (-18.18%)
Mutual labels:  model
godmt
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.
Stars: ✭ 42 (+90.91%)
Mutual labels:  model
mutable
State containers with dirty checking and more
Stars: ✭ 32 (+45.45%)
Mutual labels:  model
Blender-Tools-for-DSCS
This repository provides a work-in-progress addon for Blender 2.8 that can (to some degree) import model files from the PC version of Digimon Story: Cyber Sleuth. It provides new options in File > Import and File > Export named "DSCS Model", which should be pointed towards 'name' files in the game data. The file format is mostly understood; but …
Stars: ✭ 18 (-18.18%)
Mutual labels:  model
Quadcopter SimCon
Quadcopter Simulation and Control. Dynamics generated with PyDy.
Stars: ✭ 84 (+281.82%)
Mutual labels:  model

一个 JSON 转 Model 属性代码的 Mac 小工具,目前支持 Objective-C,Swift class, Swift struct 。

当前功能

  • JSON -> Model 属性代码
  • 添加注释占位
  • 属性对齐
  • 目前解析 JSON 是独立模块,所以支持其他语言也很简单,只需要编写相关其他语言的特性代码即可。
  • 支持 Swift 只需如下代码即可: image
        switch (obj.propertyType) {
            case BMPropertyTypeInt:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@ = 0",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeBoolean:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@ = false",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeString:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@ = \"\"",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeArray:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@: Array<<#type#>> = []",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeDictionary:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@: <#type#>?",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeObject:
                [propertyArray addObject:[NSString stringWithFormat:@"var %@: <#type#>?",
                                          obj.propertyName]];
                break;
            default:
                break;
        }
  • 支持 Objective-C 只需如下代码即可: image
        switch (obj.propertyType) {
            case BMPropertyTypeInt:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, assign) NSInteger %@;",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeBoolean:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, assign) BOOL %@;",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeString:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, copy) NSString *%@;",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeArray:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, copy) NSArray <<#type#> *> *%@;",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeDictionary:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, strong) <#type#> *%@;",
                                          obj.propertyName]];
                break;
                
            case BMPropertyTypeObject:
                [propertyArray addObject:[NSString stringWithFormat:@"@property (nonatomic, strong) <#type#> *%@;",
                                          obj.propertyName]];
                break;
            default:
                break;
        }

联系

  • 欢迎 issuesPR
  • 也可以添加微信 进微信交流群。

计划

  • 考虑支持 Swift 的相关 Model 解析框架,如:HandyJSON,ObjectMapper。
  • 支持自动生成 Model 文件;
  • 按属性类型排序等;
  • 尝试实现网页版工具;
  • 支持其他语言;
  • 等。
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].