https://github.com/danieltmbr/jsoncodegenerator
A tiny javascript, which generate DTO classes in SWIFT from JSON.
https://github.com/danieltmbr/jsoncodegenerator
codable javascript json swift swift4
Last synced: about 2 months ago
JSON representation
A tiny javascript, which generate DTO classes in SWIFT from JSON.
- Host: GitHub
- URL: https://github.com/danieltmbr/jsoncodegenerator
- Owner: danieltmbr
- License: mit
- Created: 2016-01-31T20:33:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-03T22:19:39.000Z (over 8 years ago)
- Last Synced: 2025-04-03T21:28:27.557Z (about 1 year ago)
- Topics: codable, javascript, json, swift, swift4
- Language: JavaScript
- Size: 229 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Json Code Generator
A tiny script for generating Code from JSON.
Code: right now it only support Swift 4 (with Codable protocol)
[Try it online](http://danieltmbr.github.io/JsonCodeGenerator/)
## Features
* JSON verification
* Recognize Int, Double, String, Bool, Date (by a given format), Array (even empty array), Url, custom object
* Create Structs recursively
* Generate Date extension with optional initializer (for the given format)
* Easy configuration
* Define properties as constants or variable type (let/var)
* Define number type according to decimal places
* Specify the name of the Root object
* Add custom pre & postfix to Struct names
* Specify custom date format
* Responsive layout
* Nice Xcode coloured output
## Future improvements
* Support other languages
* Go
* Kotlin
* Java (?)
* Generate output files > .zip them > download them
* Support heterogen collection parsing
## Help
This is my very first hobby project where I'm trying to use JS's prototype related features. This is also my very first project where I'm using Bootstrap CSS. So:
* Post any comment or suggestion on the code to improve it
* Post any issues you find
* Post new feature requests
* Pull requests are welcome
## Author
danieltmbr, daniel@tmbr.me
## License
Json Code Generator is available under the MIT license. See the LICENSE file for more info.