Git Product home page Git Product logo

jsonexport's Introduction

JSONExport

JSONExport is a desktop application for Mac OS X written in Swift. Using JSONExport you will be able to:

  • Convert any valid JSON object to a class of one of the currently supported languages.
  • Preview the generated content before saving it.
  • Include constructors only, utility methods only, both or none.
  • Change the root class name.
  • Set a class name prefix for the generated classes.
  • Set package name for Java files.

Generated Files

Each generated file, besid the getters and setters (for Java) can include:

  • A constructor wich accepts an instance of NSDictionary, JSON, JSONObject instance depending on the file language, and the class will use this object to fill its properties data.
  • A utility method which converts the class data into a dictionary again.

Currently supported languages

Currently you can convert your JSON object to one of the following lanaguages:

  1. Java for Android - using org.json.* classes.
  2. Swift Classes.
  3. Swift Sturcutres.
  4. Swift Classes - To use with SwiftyJSON library.
  5. Swift - CoreData.
  6. Objective-C - iOS.
  7. Objective-C - MAC.
  8. Objective-C - CoreData.
  9. Objective-C - To use with Realm.
  10. Swift Classes - To use with Realm.

Screenshot shows JSONExport used for a snippet from Twitter timeline JSON and converting it to Swift-CoreData. alt tag

Installation

Kindly clone the project, and build it using xCode 6.1+ on any Mac OS X 10.10 or above.

To Do

  • Support Objective-C Done
  • Sync multible classes with the same name (if a conflict happen)
  • Accept JSON arrays
  • Load JSON data from web
  • Open .json files with JSONExport
  • Supported languages management editor.

Known Issues:

  • When exporting to subclasses of NSManagedObject some data types can not be exported. For example core data does not have data type for "array of strings"; in turn, if your JSON contains an array of strings, the exported file will not compile without you fixing the type mismatch.

Final Note

The application still in its early stages. Please report any issue so I can improve it.

jsonexport's People

Contributors

ahmed-ali avatar

Watchers

James Cloos avatar moJom 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.