Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maybeiamme/jsonswiftconverter
Convert json result to swift codable entity file.
https://github.com/maybeiamme/jsonswiftconverter
converter domainmodel json struct swift swift4
Last synced: about 2 months ago
JSON representation
Convert json result to swift codable entity file.
- Host: GitHub
- URL: https://github.com/maybeiamme/jsonswiftconverter
- Owner: maybeiamme
- Created: 2018-07-18T09:42:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T05:52:48.000Z (over 6 years ago)
- Last Synced: 2024-12-02T03:41:20.584Z (about 2 months ago)
- Topics: converter, domainmodel, json, struct, swift, swift4
- Language: JavaScript
- Size: 16.3 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What is "JsonSwiftConverter"?
JsonSwiftConverter is a command line tool and developer framework for generating swift codable struct file
with received json response## Command line usage
### Install
**Installing the CLI**
To run the `converter` JsonSwiftConverter from the command line, you'll need to install [JsonSwiftConverter](https://github.com/maybeiamme/JsonSwiftConverter) globally first. You can do that now with the following command:
```sh
$ npm install --global jsonswiftconverter
```This adds the `converter` command to your system path, allowing it to be run from any directory.
### Run
You should now be able to run `jsonswiftconverter` with the following command:
```sh
$ 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.### Contributing
Pull requests and stars are always welcome.
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```### Author
**Jin**
* [github/maybeiamme](https://github.com/maybeiamme)
### License
Copyright © 2018, [Jin](https://github.com/maybeiamme).
Released under the [MIT license](https://opensource.org/licenses/MIT).***