Skip to content

nguyenvietvu/Xcode-Source-Editor-Extension-Jsonify

Repository files navigation

Jsonify

Generate Swift struct from json string

Jsonify

Travis Status Swift 5 @MrDev

Jsonify is an Xcode Source Editor extension that makes it easy to generate Swift struct from json string.

Features

  • ⚒ Generate Swift struct from json string
  • ⚒ Initializing properties with default values
  • ⚒ Allowing properties to be nullable(?). Determining property nullability automatically
  • ⚒ Renaming property names to be camelCase style when selecting a target JSON lib annotation.
  • ⚒ Generating Swift struct as individual struct. Generating Swift struct as inner struct.
  • ⚡️ Fast, tested, secure.

Demo

Jsonify - Demo

Installation

  • Download latest Jsonify package from the Releases.
  • Copy Jsonify to your Applications folder.
  • Launch Jsonify once. You can close it immediately afterwards.
  • Go to System Preferences > Extensions > Xcode Source Editor > select Jsonify

Jsonify Xcode Extension - Installation

Configuration

  • Type: 'let' or 'var'
  • Coding key: add coding key to struct declaration
  • Override selection: override struct generated over selection source
  • Default value: additional default for properties

Jsonify Xcode Extension - Installation

Setting Hotkey in Xcode

  • Open Xcode
  • Go to Xcode > Preferences > Key Bindings
  • Type 'Jsonify' in search field
  • Assign + J to Jsonify command

Jsonify Xcode Extension - Hotkeys

Feedback

Pull requests, issues and suggestions are warmly welcome.

Feel free to contact me @MrDev on Twitter.

About

Xcode Source Editor Extension Jsonify

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages