generate models in a simpler way
json-model-cli supports for these model library
extension | library |
---|---|
.swift | HandyJSON |
.h | JSONModel |
.h | MJExtension |
.h | YYModel |
You need to install node in advance, then:
> npm install -g json-model-cli
Just put json into the file .h
or .swift
, then:
> jm -i ./filename.swift
It will generate a model.
json-model-cli supports some arguments, you could find it by:
> jm -h
Usage: jm [options]
Options:
-V, --version output the version number
-i, --input <path> input file (include .h .swift)
-I, --input <path> input file (include .h .swift)
-e, --except [value] input an array that requires ignore, list by "," (default: )
-h, --help output usage information
Examples:
$ jm -i ./test.h -e pic_infos
json-model-cli is provided under the MIT license.