Skip to content

viteinfinite/json2swift

Repository files navigation

Logoβ

Build Status Coverage Status

Automatically create Swift entities from JSON.

HTML interface

The most straightforward way to use JSON2Swift is through the JSON2Swift Web page, available at:

https://viteinfinite.github.io/json2swift

Usage

Click and type and click the HTML interface.

Build from sources

You can also build from sources by performing

npm install
node node_modules/gulp/bin/gulp.js build

You'll then be able to use the parseDocument(JSON, [writers]) function against a JavaScript object and by providing a list of writers.

Writers

The writers, i.e. the output format, currently supported are currently:

  • writers.base, supporting structs
  • writers.class, supporting classes
  • writers.nsObject, supporting NSObjects
  • writers.argo, supporting Argo
  • writers.unbox, supporting Unbox
  • writers.jsonJoy, supporting JSONJoy
  • writers.realm, supporting Realm

Writers can be mixed and matched. For instance, you could provide the parseDocument function with an array composed of nsObject and argo writers:

parseDocument({"key": "value"}, [writers.base, writers.nsObject, writers.argo])

Credits

JSON2Swift is supported by

Contributing

You are encouraged to read the contributing document available in this repository. Thanks for your feedback!

About

Automatically create Swift entities from JSON.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published