/json-model-cli

generate models in a simpler way

Primary LanguageJavaScript

json-model-cli

Build Status

generate models in a simpler way

Now

json-model-cli supports for these model library

extension library
.swift HandyJSON
.h JSONModel
.h MJExtension
.h YYModel

How

install

You need to install node in advance, then:

> npm install -g json-model-cli

usage

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

License

json-model-cli is provided under the MIT license.