
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
genmodel 可以使用命令根据json文件生成object-c的model,避免重复的劳动
npm install genmodel -g
genmodel -h 可得到下面使用说明 `Usage: genmodel [options]
Options:
-i, --inPath the json source file path [string] [required]
-o, --outPath the model output file path [string]
-n, --name the name of the root model,will apply prefix or suffix for
root model and all nest models if exists
[string] [required]
-p, --class_prefix the model className of prefix [string]
-s, --class_suffix the model className of suffix [string]
-k, --key the key path for json object to generate model [string]
-m, --class_map the map className for the nest object or array; use -m
".products=product",also apply prefix or suffix [string]
-t, --template the template for modelClass,use "iPadModel" or "YYModel"
or custom template path,default "iPadModel" [string]
-h, --help Show help [boolean]
Examples:
genmodel -n User -p XX -s Model -i xxx.json -o ~/Desktop
generate XXUserModel with the xxx.json to Desktop
copyright 2016`
###注意事项
{
"orderId": 104,
"totalPrice": 103.45,
"products": [
{
"id": 123,
"name": "Product #1",
"price": 12.95,
"productIn": {
"idInArr": 123,
"name": "Product name",
"price": 12.95
}
}
],
"productOut": {
"id": 123,
"name": "Product name",
"price": 12.95,
"productIn": {
"idIn": 123,
"name": "Product name",
"price": 12.95
}
}
}
指定 -k '.products.0.productIn' -n product 则只会以productIn的json生成product类,--key 可以嵌套,以"."开头,以文件json的根对象开始遍历,数组只能指定索引为 0
.productOut=product,.userB=user以"."开头,可以嵌套路径,从根对象开始(如有-key,则为-key指定的根对象),以逗号分隔,中间不要留空格 如以上json 执行 genmodel -n order -i xxx.json -m '.productOut=product' 则生成order类,product类FAQs
generate object-c model with a template
We found that genmodel demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.