JsonSwiftConverter is a command line tool and developer framework for generating swift codable struct file with received json response
Installing the CLI
To run the converter
JsonSwiftConverter from the command line, you'll need to install JsonSwiftConverter globally first. You can do that now with the following command:
$ npm install --global jsonswiftconverter
This adds the converter
command to your system path, allowing it to be run from any directory.
You should now be able to run jsonswiftconverter
with the following command:
$ converter -H HEADER -X GET -N ClassName -A public -P ./Generated.swift
What will happen?
For $ converter
, you can use same options as curl to send a request to your desired api.
Then jsonswiftconverter will create structs conforming codable protocols.
Pull requests and stars are always welcome.
Install dev dependencies:
$ npm install -d && npm test
Jin
Copyright © 2018, Jin. Released under the MIT license.