Paste JSON as Code
quicktype
Paste JSON as Code is an Xcode 9 extension that helps you turn sample JSON into typed models and serializers using quicktype.
by David Siegel
What you get
Turn your sample JSON into typed code without writing every model yourself.
You get a starting point for working with JSON in your code, rather than building every data model by hand. Paste JSON as Code uses quicktype to infer types from your sample data and generate strongly typed models and serializers. You can spend less time translating JSON fields into code and more time using that data in your app.
The extension brings quicktype into Xcode 9. Its code generation supports Swift, Objective-C, C++, and other languages. If you develop against JSON data, you get models based on the examples you provide, plus serialization code, instead of having to write both from scratch.
-
Less manual model writing
You turn sample JSON into typed models instead of defining every field yourself.
-
Serialization code included
You get serializers alongside your models, reducing the code you need to write to work with JSON.
-
Work within Xcode 9
You can use quicktype through an extension in your Xcode 9 workflow.
-
Use your development language
You can generate code for Swift, Objective-C, C++, and other supported languages.
Best for
- You build apps that consume JSON data
- You use Xcode 9 and want to reduce model-writing work
- You need typed models from sample JSON
Skip it if
You do not work with JSON data or need an extension explicitly documented for a newer Xcode version.
Screenshots
From the developer
quicktype infers types from sample JSON data, then outputs strongly typed models and serializers for working with that data in Swift, Objective-C, C++, and more. This extension adds native quicktype support to Xcode 9. Try quicktype in your browser at https://app.quicktype.ioRead the full description
Alternatives to Paste JSON as Code
Other apps to developer utilities. See all