Giter Club home page Giter Club logo

swiftyjsonaccelerator's Introduction

Logo

SwiftyJSONAccelerator

Build Status codecov

Version v1.0.0 Released!

  • Now generates Swift 3 and the software itself is upgraded to Swift 3.
  • Unit tests and complete code coverage for file generation module.
  • Modular code to make adding support for other JSON mapping libraries simple.
  • Project upgraded with SwiftLint, Travis, CocoaPods etc.

Download/Installing

A swift model generator like the Objective-C JSONAccelerator. Formats and generates models for the given JSON and also breaks them into files making it easy to manage and share between several models.

The models that are generated depend on JSON object mapping libraries, currently the model can be generated to depend on any of the below mentioned mapping libraries:

Currently, the pattern is very similar to its Objective-C counterpart. It generates classes with following properties.

  • Initalize with JSON (SwiftyJSON or ObjectMapper) or Initalize with Any
  • Optional NSCoding compliance.
  • Convert object to Dictionary for description printing.

Preview

  • Simple configurable interface for generation of file.
  • Each class in the JSON is generated as a file.

Adding New Libraries

  • Add a new type in JSONMappingLibrary in Constants.swift.
  • Follow the examples in Library-Extensions and create a struct implementingModelFile. Follow the other extensions for SwiftyJSON and ObjectMapper, they tell you what all you can replace based on your libraries specification.
  • Do the necessary UI changes for the dropdown.
  • Add tests for your library.

Swift 2?

Download (v0.0.6), the older version of the project, please keep in mind it is no longer supported.

Todo

There is a lot more to do, follow the issues section, I usually try to follow up or keep the list updated with any new ideas which I plan to implement.

  • Build a CLI, useful in integrated with mocks and API documentations.
  • Creating a better UI for the application.
  • Adding support for better libraries mentioned here.

Contributions and Requests

Any suggestions regarding code quality of the app, generated code's quality, Swift related improvements and pull requests are all very welcome. Please make sure you submit the pull request to the next release branch and not the master branch.

License

MIT License / Karthikeya Udupa

swiftyjsonaccelerator's People

Contributors

amyleecodes avatar insanoid avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.